Permalink
Browse files

'add' in cloudsearch equals to 'upsert' in mongo

  • Loading branch information...
1 parent c240c1c commit 5c203622c34c1bf66ff0b83dd61ab933c1eece26 @hokuma committed Sep 23, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 nozama-cloudsearch-data/nozama/cloudsearch/data/document.py
@@ -218,8 +218,8 @@ def load(docs_to_load):
if to_load:
log.debug("bulk loading: '{0}' document(s)".format(len(to_load)))
- conn.documents.insert(to_load)
for doc in to_load:
+ conn.documents.update({'_id': doc['id']}, doc, True)
add_to_elasticsearch(doc)
if to_remove:

0 comments on commit 5c20362

Please sign in to comment.