Skip to content

Commit

Permalink
Add delete_doc function
Browse files Browse the repository at this point in the history
  • Loading branch information
zgary committed Jan 7, 2022
1 parent 59cc291 commit bdb17ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/search/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ def delete_index():
"""
es.indices.delete(current_app.config["ELASTICSEARCH_INDEX"], ignore=[400, 404])

def delete_doc(request_id):
"""
Delete a specific doc in the index.
"""
es.delete(index=current_app.config['ELASTICSEARCH_INDEX'],
doc_type="request",
id=request_id)

def delete_docs():
"""
Expand Down

0 comments on commit bdb17ff

Please sign in to comment.