class_docstr: Elasticsearch driver for image-match
  
      
docstr: Extra setup for Elasticsearch
  
  Args:
      es (elasticsearch): an instance of the elasticsearch python driver
      index (Optional[string]): a name for the Elasticsearch index (default 'images')
      doc_type (Optional[string]): a name for the document time (default 'image')
      timeout (Optional[int]): how long to wait on an Elasticsearch query, in seconds (default 10)
      size (Optional[int]): maximum number of Elasticsearch results (default 100)
      *args (Optional): Variable length argument list to pass to base constructor
      **kwargs (Optional): Arbitrary keyword arguments to pass to base constructor
  
  Examples:
      >>> from elasticsearch import Elasticsearch
      >>> from image_match.elasticsearch_driver import SignatureES
      >>> es = Elasticsearch()
      >>> ses = SignatureES(es)
      >>> ses.add_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
      >>> ses.search_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
      [
       {'dist': 0.0,
        'id': u'AVM37nMg0osmmAxpPvx6',
        'path': u'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg',
        'score': 0.28797293}
      ]
docstr_tok: ["Extra","setup","for","Elasticsearch","Args",":","es","(","elasticsearch",")",":","an","instance","of","the","elasticsearch","python","driver","index","(","Optional","[","string","]",")",":","a","name","for","the","Elasticsearch","index","(","default","'images","'",")","doc_type","(","Optional","[","string","]",")",":","a","name","for","the","document","time","(","default","'image","'",")","timeout","(","Optional","[","int","]",")",":","how","long","to","wait","on","an","Elasticsearch","query",",","in","seconds","(","default","10",")","size","(","Optional","[","int","]",")",":","maximum","number","of","Elasticsearch","results","(","default","100",")","*","args","(","Optional",")",":","Variable","length","argument","list","to","pass","to","base","constructor","*","*","kwargs","(","Optional",")",":","Arbitrary","keyword","arguments","to","pass","to","base","constructor","Examples",":",">",">",">","from","elasticsearch","import","Elasticsearch",">",">",">","from","image_match.elasticsearch_driver","import","SignatureES",">",">",">","es","=","Elasticsearch","(",")",">",">",">","ses","=","SignatureES","(","es",")",">",">",">","ses.add_image","(","'https",":","\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/e\/ec\/Mona_Lisa",",","_by_Leonardo_da_Vinci",",","_from_C2RMF_retouched.jpg\/687px-Mona_Lisa",",","_by_Leonardo_da_Vinci",",","_from_C2RMF_retouched.jpg","'",")",">",">",">","ses.search_image","(","'https",":","\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/e\/ec\/Mona_Lisa",",","_by_Leonardo_da_Vinci",",","_from_C2RMF_retouched.jpg\/687px-Mona_Lisa",",","_by_Leonardo_da_Vinci",",","_from_C2RMF_retouched.jpg","'",")","[","{","'dist","'",":","0.0",",","'id","'",":","u'AVM37nMg0osmmAxpPvx6","'",",","'path","'",":","u'https",":","\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/e\/ec\/Mona_Lisa",",","_by_Leonardo_da_Vinci",",","_from_C2RMF_retouched.jpg\/687px-Mona_Lisa",",","_by_Leonardo_da_Vinci",",","_from_C2RMF_retouched.jpg","'",",","'score","'",":","0.28797293","}","]"]
code: def __init__(
      self,
      es,
      index="images",
      doc_type="image",
      timeout="10s",
      size=100,
      *args,
      **kwargs,
  ):
      """Extra setup for Elasticsearch
  
      Args:
          es (elasticsearch): an instance of the elasticsearch python driver
          index (Optional[string]): a name for the Elasticsearch index (default 'images')
          doc_type (Optional[string]): a name for the document time (default 'image')
          timeout (Optional[int]): how long to wait on an Elasticsearch query, in seconds (default 10)
          size (Optional[int]): maximum number of Elasticsearch results (default 100)
          *args (Optional): Variable length argument list to pass to base constructor
          **kwargs (Optional): Arbitrary keyword arguments to pass to base constructor
  
      Examples:
          >>> from elasticsearch import Elasticsearch
          >>> from image_match.elasticsearch_driver import SignatureES
          >>> es = Elasticsearch()
          >>> ses = SignatureES(es)
          >>> ses.add_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
          >>> ses.search_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
          [
           {'dist': 0.0,
            'id': u'AVM37nMg0osmmAxpPvx6',
            'path': u'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg',
            'score': 0.28797293}
          ]
  
      """
      self.es = es
      self.index = index
      self.doc_type = doc_type
      self.timeout = timeout
      self.size = size
  
      super(SignatureES, self).__init__(*args, **kwargs)
  
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 1 to create a new SignatureES object from inherited base classes: SignatureDatabaseBase with example: obj = SignatureES(es, index, doc_type, timeout, size)