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/12 01:42:29 UTC
[kibble] branch master updated: fix document counting for ES5 and
below
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 ab79bf8 fix document counting for ES5 and below
ab79bf8 is described below
commit ab79bf875dec0f78279241fca98737c4c9f343c7
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Sep 12 03:42:19 2018 +0200
fix document counting for ES5 and below
---
api/pages/org/list.py | 1 -
api/plugins/database.py | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/api/pages/org/list.py b/api/pages/org/list.py
index 510f796..28d6d6f 100644
--- a/api/pages/org/list.py
+++ b/api/pages/org/list.py
@@ -138,7 +138,6 @@ def run(API, environ, indata, session):
orgID = doc['_source']['id']
numDocs = session.DB.ES.count(
index=session.DB.dbname,
- doc_type = '*',
body = {'query': { 'term': {'organisation': orgID}}}
)['count']
numSources = session.DB.ES.count(
diff --git a/api/plugins/database.py b/api/plugins/database.py
index 4ec5b92..a01a6c7 100644
--- a/api/plugins/database.py
+++ b/api/plugins/database.py
@@ -53,7 +53,7 @@ class KibbleESWrapper(object):
_source_include = _source_include,
body = body
)
- def count(self, index, doc_type, body = None):
+ def count(self, index, doc_type = '*', body = None):
return self.ES.count(
index = index+'_'+doc_type,
doc_type = '_doc',