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 2017/10/23 21:47:53 UTC
[kibble-scanners] branch master updated: compact,
add doc_as_upsert for updates which 404s
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-scanners.git
The following commit(s) were added to refs/heads/master by this push:
new ca73010 compact, add doc_as_upsert for updates which 404s
ca73010 is described below
commit ca730102532591c2050b42d8e00ce3b3a3ac0a95
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Oct 23 23:47:43 2017 +0200
compact, add doc_as_upsert for updates which 404s
---
src/plugins/brokers/kibbleES.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/brokers/kibbleES.py b/src/plugins/brokers/kibbleES.py
index b834e04..62011bf 100644
--- a/src/plugins/brokers/kibbleES.py
+++ b/src/plugins/brokers/kibbleES.py
@@ -107,8 +107,8 @@ class KibbleBit:
'_index': self.broker.config['elasticsearch']['database'],
'_type': js['doctype'],
'_id': js['id'],
- 'doc': doc,
- '_source': js
+ 'doc' if js.get('upsert') else '_source': doc,
+ 'doc_as_upsert': True,
})
try:
elasticsearch.helpers.bulk(self.broker.DB, js_arr)
--
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].