本文整理汇总了Python中elasticsearch_tornado.IndicesClient类的典型用法代码示例。如果您正苦于以下问题:Python IndicesClient类的具体用法?Python IndicesClient怎么用?Python IndicesClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IndicesClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_template
def test_get_template(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.get_template(name='test', callback=h_cb)
self.wait()
示例2: test_delete
def test_delete(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.delete('test', callback=h_cb)
self.wait()
示例3: test_snapshot_index
def test_snapshot_index(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.snapshot_index(callback=h_cb)
self.wait()
示例4: test_analyze
def test_analyze(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 404]}
)
c.analyze(index='test', cb=h_cb)
self.wait()
示例5: test_exists_alias
def test_exists_alias(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.exists_alias('test', index='test', callback=h_cb)
self.wait()
示例6: test_get_field_mapping
def test_get_field_mapping(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.get_field_mapping('test', index='test', callback=h_cb)
self.wait()
示例7: test_close
def test_close(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.close('test', cb=h_cb)
self.wait()
示例8: test_exists_type
def test_exists_type(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.exists_type('test', 'type', callback=h_cb)
self.wait()
示例9: test_flush
def test_flush(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.flush(index='test', callback=h_cb)
self.wait()
示例10: test_delete_warmer
def test_delete_warmer(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.delete_warmer('test', 'test', cb=h_cb)
self.wait()
示例11: test_refresh
def test_refresh(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.refresh(index='test', cb=h_cb)
self.wait()
示例12: test_exists_template
def test_exists_template(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.exists_template('test', cb=h_cb)
self.wait()
示例13: test_get_aliases
def test_get_aliases(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
c.get_aliases(index='test', cb=h_cb)
self.wait()
示例14: test_put_settings
def test_put_settings(self):
c = IndicesClient()
body = """
{
"index" : {
"number_of_replicas" : 1
}
}
"""
c.put_settings(body, callback=self.handle_cb)
self.wait()
示例15: test_put_alias
def test_put_alias(self):
c = IndicesClient()
h_cb = partial(
self.handle_cb,
**{'codes':[400, 403, 404]}
)
body = """
{
"actions" : [
{ "add" : { "index" : "test1", "alias" : "alias1" } }
]
}
"""
c.put_alias('test', 'test', body, callback=h_cb)
self.wait()