While waiting for an update on query support, I chose:
In addition, I store the tag data (your CSV) in a separate type of document and request from it and mark all new documents as they are created, i.e. No need to index and then update.
Python snippet to illustrate the approach:
def actiongen(): docs = helpers.scan(es, query=myquery, index=myindex, fields=['_id']) for doc in docs: yield { '_op_type': 'update', '_index': doc['_index'], '_type': doc['_type'], '_id': doc['_id'], 'doc': {'tags': tags}, } helpers.bulk(es, actiongen(), index=args.index, stats_only=True)
source share