I have documents that are grouped in families. I need the possibility to search at the document level and at the family level. That is why I think I need two indexes : the first one will map my source document to an elasticsearch document and the second will map a family of my source documents to an elasticsearch document.
My question is : do I have to keep the _source field in my two indexes? I have a lot of data and I don't want to duplicate it in the two indexes. I have two keep the _source field because I want to use partial update on documents and all highlighting, but I was wondering if it is possible to keep it only in one index (family level index or document level index). For example, if I keep _source in the document-level index, and want to update a document, I can do a partial update and rebuild the family from the _source of its children (I'll probably have to do some code, but I think it won't be too complicated...)
The question is : can I implement the same behavior for highlighting? In others words, in order to highlight a family, am I able to implement a kind of "mapper" that will get _source fields of the documents in the document level index to highlight results of my family index? I hope my explanation is clear :-).