class_docstr: Elasticsearch driver for image-match
  
      
docstr: Delete all but one entries in elasticsearch whose `path` value is equivalent to that of path.
  Args:
      path (string): path value to compare to those in the elastic search
docstr_tok: ["Delete","all","but","one","entries","in","elasticsearch","whose","`","path","`","value","is","equivalent","to","that","of","path",".","Args",":","path","(","string",")",":","path","value","to","compare","to","those","in","the","elastic","search"]
code: def delete_duplicates(self, path):
      """Delete all but one entries in elasticsearch whose `path` value is equivalent to that of path.
      Args:
          path (string): path value to compare to those in the elastic search
      """
      matching_paths = [
          item["_id"]
          for item in self.es.search(
              body={
                  "query": {
                      "match": {"{}.path".format(self.doc_type): path}
                  }
              },
              index=self.index,
          )["hits"]["hits"]
          if item["_source"][self.doc_type]["path"] == path
      ]
      if len(matching_paths) > 0:
          for id_tag in matching_paths[1:]:
              self.es.delete(index=self.index, id=id_tag)
  
file_path: image-match/image_match/elasticsearch_driver.py
imports: from .signature_database_base import SignatureDatabaseBase
  from .signature_database_base import normalized_distance
  from datetime import datetime
  import numpy
  from collections import deque
label_desc: Use image node_id 4 for calling the SignatureES obj's underlying member method code with example usage: obj.delete_duplicates(path) without return types