stefanvodita commented on issue #13166: URL: https://github.com/apache/lucene/issues/13166#issuecomment-2039818948
The demo would facet over docs in the main index and aggregate over values stored in the taxonomy, e.g. using `IntTaxonomyFacets`. The missing piece is reading values from the taxonomy for aggregation. The faceting class accepts a doc values iterator which provides values. I think we need to set up an iterator that gets the taxonomy value corresponding to a doc in the main index. ``` Rough example: Main index: {docid: 0, author: Tolkien}, {docid: 1, author: Lewis}, {docid: 2, author: Tolkien} Taxonomy: {docid: 0, null}, {docid: 1, author}, {docid: 2, Tolkien, score: 9}, {docid: 3, Lewis, score: 8} Iterator: {0 -> 9, 1 -> 8, 2 -> 9} Explanation: For docid 0 in the main index, we have Tolkien, which we find at docid 2 in the taxonomy, which corresponds to score 9. We put {0 -> 9} in the iterator. For docid 1 in the main index, we have Lewis, which we find at docid 3 in the taxonomy, which corresponds to score 8. We put {1 -> 8} in the iterator. For docid 2 in the main index, we have Tolkien, which we find at docid 2 in the taxonomy, which corresponds to score 9. We put {2 -> 9} in the iterator. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org