Did I find the right examples for you? yes no

All Samples(34)  |  Call(34)  |  Derive(0)  |  Import(0)
Connect to an elasticsearch instance

src/e/s/esimport-0.1.9/esimport/elasticsearch.py   esimport(Download)
	def __init__(self, server, username, password, timeout=TIMEOUT_DEFAULT, verify=True):
		self.es = rawes.Elastic(server, auth=(username, password), timeout=timeout, verify=verify)
 
 
 

src/e/s/esimport-HEAD/esimport/elasticsearch.py   esimport(Download)
	def __init__(self, server, username, password, timeout=TIMEOUT_DEFAULT, verify=True):
		self.es = rawes.Elastic(server, auth=(username, password), timeout=timeout, verify=verify)
 
 
 

src/r/e/regulations-scraper-HEAD/regscrape/regs_common/commands/administer_search.py   regulations-scraper(Download)
def run(options, args):
    import settings, regs_common
 
    es = rawes.Elastic(getattr(settings, "ES_HOST", 'thrift://localhost:9500'), timeout=30.0)
 

src/r/e/regulations-scraper-HEAD/regscrape/regs_common/commands/add_to_search.py   regulations-scraper(Download)
def add_to_search(options, args):
    import settings
 
    es = rawes.Elastic(getattr(settings, "ES_HOST", 'thrift://localhost:9500'), timeout=60.0)
 

src/p/i/pillowtop-0.1.5/pillowtop/listener.py   pillowtop(Download)
    def get_es(self):
        return rawes.Elastic('%s:%s' % (self.es_host, self.es_port), timeout=self.es_timeout)
 
    def delete_index(self):
        """

src/c/o/commcare-hq-HEAD/corehq/elastic.py   commcare-hq(Download)
def get_es(timeout=30):
    """
    Get a handle to the configured elastic search DB
    """
    return rawes.Elastic('%s:%s' % (settings.ELASTICSEARCH_HOST, 

src/e/l/elseql-0.2.3/elseql/search.py   elseql(Download)
        if port:
            try:
                self.es = rawes.Elastic(port)
                self.get_mapping()
            except ConnectionError as err:

src/e/l/elseql-HEAD/elseql/search.py   elseql(Download)
        if port:
            try:
                self.es = rawes.Elastic(port)
                self.get_mapping()
            except ConnectionError as err:

src/n/i/nihongo-HEAD/scripts/populate.py   nihongo(Download)
elif es:
    ELASTICSEARCH_URI = 'localhost:9200'
    es = rawes.Elastic(ELASTICSEARCH_URI)
 
    try:

src/r/a/rawes-0.5.5/tests/core_tests.py   rawes(Download)
    def setUpClass(self):
        self.http_url = '%s:%s' % (config.ES_HOST, config.ES_HTTP_PORT)
        self.es_http = rawes.Elastic(url=self.http_url)
        self.custom_json_decoder = test_encoder.DateAwareJsonDecoder().decode
        if not config.HTTP_ONLY:
            self.thrift_url = '%s:%s' % (config.ES_HOST, config.ES_THRIFT_PORT)
            self.es_thrift = rawes.Elastic(url=self.thrift_url)
    def test_timeouts(self):
        es_http_short_timeout = rawes.Elastic(url=self.http_url, timeout=0.0001)
        self._test_timeout(es_short_timeout=es_http_short_timeout)
 
        if not config.HTTP_ONLY:
            es_thrift_short_timeout = rawes.Elastic(url=self.thrift_url, timeout=0.0001)
            self._test_timeout(es_short_timeout=es_thrift_short_timeout)
 
    def test_json_decoder_encoder(self):
        es_http_decoder = rawes.Elastic(url=self.http_url, json_decoder=self.custom_json_decoder)

  1 | 2  Next