I have created a custom Collector extending SimpleCollector. I can see the
methods scoreMode() and collect(int doc).
I am seeing that the collect method is invoked by lucene with the child
docId. Am I moving in the right direction?
But to collect the values I would need the Document by using
read
Indeed you shouldn't load all hits, you should register a
org.apache.lucene.search.Collector that will aggregate data while matches
are being collected.
Since you are already using a ToChildBlockJoinQuery, you should be able to
use it in conjunction with utility classes from lucene/facets. Have yo
Hi Adrien,
Thanks for the reply.
I am able to retrieve the child docId's using the .ToChildBlockJoinQuery.
Now for me to do aggregates i need to find the document using
reader.document(int docID) right?. If that is the case won't getting all
the documents would be a costly operation and then fina
It's not straightforward as we don't provide high-level tooling to do this.
You need to use the BitSetProducer that you pass to the
ToParentBlockJoinQuery in order to resolve the range of child doc IDs for a
given parent doc ID (see e.g. how ToChildBlockJoinQuery does it), and then
aggregate over t
Hi Team,
I have a document structure as a customer which itself has few attributes
like gender, location etc.
Each customer will have a list of facts like transaction, product views etc.
I want to do an aggregation of the facts. For example find all customers
who are from a specific location and