Commit c8bddd6e by Tim Babych Committed by Oleg Marshev

better delete

parent ba00cf80
...@@ -76,11 +76,7 @@ def update_in_index(sender, instance, **kw): ...@@ -76,11 +76,7 @@ def update_in_index(sender, instance, **kw):
def delete_in_index(sender, instance, **kw): def delete_in_index(sender, instance, **kw):
if settings.ES_DISABLED: if settings.ES_DISABLED:
return return
get_es().delete( NoteMappingType.unindex(id_=instance.id)
index=settings.ES_INDEXES['default'],
doc_type=NoteMappingType.get_mapping_type_name(),
id=instance.id
)
class NoteMappingType(MappingType, Indexable): class NoteMappingType(MappingType, Indexable):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment