I have collection in mongo with about 5 millions documents, number may increase to houndereds of millions. I have to implement searching and aggregation through this collection.
I installed elasticsearch with mongodb river for collection synchronization.
For searching I need to mark documents by different tags. For instance there is document which field
user_agent contains string
ios. This document must be marked by
ios tag. Then thees tags will be used for aggregation and search.
Question is how to implement efficiently setting up tags for documents? ES doesnt support batch update by query (only with plugin but it works slow). Also source documents in MongodDB should also contain tags not only ES index for cases when recreating ES index is necessary.