You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2018/09/13 09:04:24 UTC
[kibble] branch master updated: Add scroll feature to the ES wrapper
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git
The following commit(s) were added to refs/heads/master by this push:
new 187759a Add scroll feature to the ES wrapper
187759a is described below
commit 187759aa443d6b11e7df37a465ad739ab91c9846
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Thu Sep 13 11:04:11 2018 +0200
Add scroll feature to the ES wrapper
---
api/plugins/database.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/api/plugins/database.py b/api/plugins/database.py
index a01a6c7..31ffaa0 100644
--- a/api/plugins/database.py
+++ b/api/plugins/database.py
@@ -45,11 +45,14 @@ class KibbleESWrapper(object):
return self.ES.index(index = index+'_'+doc_type, doc_type = '_doc', id = id, body = body)
def update(self, index, doc_type, id, body):
return self.ES.update(index = index+'_'+doc_type, doc_type = '_doc', id = id, body = body)
- def search(self, index, doc_type, size = 100, _source_include = None, body = None):
+ def scroll(self, scroll_id, scroll):
+ return self.ES.scroll(scroll_id = scroll_id, scroll = scroll)
+ def search(self, index, doc_type, size = 100, scroll = None, _source_include = None, body = None):
return self.ES.search(
index = index+'_'+doc_type,
doc_type = '_doc',
size = size,
+ scroll = scroll,
_source_include = _source_include,
body = body
)