本文整理匯總了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()