diff --git a/autocomplete_multi_models/business_process.py b/autocomplete_multi_models/business_process.py index e33e48334c3b6a961c72767300034bdeb71d2a7f..b86026af350bf7ccbdfda1fb767a722b134053d2 100644 --- a/autocomplete_multi_models/business_process.py +++ b/autocomplete_multi_models/business_process.py @@ -44,16 +44,15 @@ def rebuild_index(): models.IndexedWord.objects.bulk_create(objects.values()) - -def clean_duplicate(): - models.IndexedWord.objects.annotate( - is_duplicate=Exists( - models.IndexedWord.objects.filter( - word__iexact=OuterRef('word'), - pk__gt=OuterRef('pk'), - ) - ) - ).filter(is_duplicate=True).delete() +# def clean_duplicate(): +# models.IndexedWord.objects.annotate( +# is_duplicate=Exists( +# models.IndexedWord.objects.filter( +# word__iexact=OuterRef('word'), +# pk__gt=OuterRef('pk'), +# ) +# ) +# ).filter(is_duplicate=True).delete() def add_instance_to_index(instance, field_names: List[str]):