Hi, I have a tree structure of documents, with a document having multiple parents. This is mapped in the Lucene index using a multivaluefield when indexing as so:
Document doc = new Document(); doc.add(new Field("uuid","value",MYFIELDTYPE.NOTANALYZED); doc.add(new Field("parent","parent",MYFIELDTYPE.NOTANALYZED); doc.add(new Field("parent","parent",MYFIELDTYPE.NOTANALYZED);...... indexwriter.addDocument(doc) I then need to group the results I get having the most common parent of the tree as my final result. I am facing a problem as the parent field contains only the direct parent, this direct parent is stored also in the index in the same way but when collecting the documents I don't know how to access it within the collect(ind docID) I can access the fields and group through inserting into a map but how do a group for example if two elements within a group have the same parent. Also if a change to the index would be welcome any input will be grateful Best Regards, Taher Galal