当前位置: 首页>>代码示例>>Python>>正文


Python elasticsearch_tornado.BaseClient类代码示例

本文整理汇总了Python中elasticsearch_tornado.BaseClient的典型用法代码示例。如果您正苦于以下问题:Python BaseClient类的具体用法?Python BaseClient怎么用?Python BaseClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BaseClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_mtermvector

 def test_mtermvector(self):
     c = BaseClient()
     body = """
     {
         "docs": [
             {
                 "_index": "testidx",
                 "_type": "test",
                 "_id": "2",
                 "term_statistics": true
             },
             {
                "_index": "testidx",
                "_type": "test",
                "_id": "1",
                "fields": [
                    "text"
                ]
             }
         ]
     }
     
     """
     c.mtermvectors(
         index = 'index',
         doc_type = 'index',
         body = body,
         cb=self.handle_cb,
     )
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:30,代码来源:test_client.py

示例2: test_abort_benchmark

 def test_abort_benchmark(self):
     c = BaseClient()
     c.abort_benchmark(
         name = 'test',
         cb   = self.handle_cb,
     )
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:7,代码来源:test_client.py

示例3: test_suggest

 def test_suggest(self):
     c = BaseClient()
     c.suggest(
             '{"bulk":"bulk1","id_":"bulk1"}', index='test',
             cb=self.handle_cb
     )
     self.wait()
开发者ID:msabramo,项目名称:elasticsearch_tornado,代码行数:7,代码来源:test_client.py

示例4: test_scroll

 def test_scroll(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400]}
     )
     c.scroll('test', cb=h_cb)
     self.wait()
开发者ID:msabramo,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例5: test_get_doc

 def test_get_doc(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_doc('test', 'test123', callback=h_cb)
     self.wait()
开发者ID:hodgesds,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例6: test_clear_scroll

 def test_clear_scroll(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.clear_scroll('aaaaa', cb=h_cb)
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例7: test_get_source

 def test_get_source(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_source('test', 'test123', cb=h_cb)
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例8: test_search_template

 def test_search_template(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 404, 403,]}
     )
     c.search_template(index='test', doc_type='test', cb=h_cb)
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例9: test_put_template

 def test_put_template(self):
     c = BaseClient()
     c.put_template(
         'temp123',
         '{"template":"test123"}',
         cb = self.handle_cb,
     )
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例10: test_count_percolate

 def test_count_percolate(self):
     c = BaseClient()
     c.count_percolate(
             'test',
             'test',
             cb=self.handle_cb
     )
     self.wait()
开发者ID:msabramo,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例11: test_mtermvector

 def test_mtermvector(self):
     c = BaseClient()
     c.mtermvectors(
             index = 'index',
             doc_type = 'index',
             cb=self.handle_cb,
     )
     self.wait()
开发者ID:msabramo,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例12: test_exists

 def test_exists(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.exists('test', 'test123', cb=h_cb)
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例13: test_index

 def test_index(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.index('test', 'test', '{"test":"123"}', doc_id='test123', cb=h_cb)
     self.wait()
开发者ID:shejianmin,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例14: test_search_shards

 def test_search_shards(self):
     c = BaseClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 404, 403,]}
     )
     c.search_shards(index='test', doc_type='test', callback=h_cb)
     self.wait()
开发者ID:hodgesds,项目名称:elasticsearch_tornado,代码行数:8,代码来源:test_client.py

示例15: test_termvector

 def test_termvector(self):
     c = BaseClient()
     c.termvector(
             'index',
             'index',
             'bulk1',
             cb=self.handle_cb,
     )
     self.wait()
开发者ID:msabramo,项目名称:elasticsearch_tornado,代码行数:9,代码来源:test_client.py


注:本文中的elasticsearch_tornado.BaseClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。