예제 #1
0
파일: search.py 프로젝트: azerbini/eamena
 def __init__(self):
     #
     serializer = JSONSerializer()
     serializer.mimetype = 'application/json'
     serializer.dumps = serializer.serialize
     serializer.loads = JSONDeserializer().deserialize
     self.es = Elasticsearch(hosts=settings.ELASTICSEARCH_HOSTS, serializer=serializer, **settings.ELASTICSEARCH_CONNECTION_OPTIONS)
     self.logger = logging.getLogger(__name__)
예제 #2
0
파일: search.py 프로젝트: u5673710/arches
 def __init__(self):
     #
     serializer = JSONSerializer()
     serializer.mimetype = 'application/json'
     serializer.dumps = serializer.serialize
     serializer.loads = JSONDeserializer().deserialize
     self.es = Elasticsearch(hosts=settings.ELASTICSEARCH_HOSTS, serializer=serializer, **settings.ELASTICSEARCH_CONNECTION_OPTIONS)
     self.logger = logging.getLogger(__name__)
예제 #3
0
파일: search.py 프로젝트: KSWadwicz/arches
 def __init__(self, **kwargs):
     #
     serializer = JSONSerializer()
     serializer.mimetype = "application/json"
     serializer.dumps = serializer.serialize
     serializer.loads = JSONDeserializer().deserialize
     self.prefix = kwargs.pop("prefix", "").lower()
     self.es = Elasticsearch(serializer=serializer, **kwargs)
     self.logger = logging.getLogger(__name__)