[ https://issues.apache.org/jira/browse/LUCENE-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497023#comment-17497023 ]
Adrien Grand commented on LUCENE-10438: --------------------------------------- I believe that it is mostly applicable to term and range faceting. Each bucket can be expressed as a filter (TermQuery for terms facets and PointRangeQuery for range facets) and the faceting framework would detect when the query matches all documents (so that the filters that describe the buckets do not need to be intersected with anything) in order to compute counts for the buckets by calling Weight#count for each of these filters. For terms it would just read the document frequency from the inverted index and for ranges it would use the new logic we added that just counts the number of matches on the two leaves that intersect the query and count how many documents belong to leaves that are fully contained by the query. I'm not familiar enough with the faceting framework to comment on how best to fold this into the existing logic, but this would need to run before matches are loaded into a bitset indeed. > Leverage Weight#count in lucene/facets > -------------------------------------- > > Key: LUCENE-10438 > URL: https://issues.apache.org/jira/browse/LUCENE-10438 > Project: Lucene - Core > Issue Type: Task > Components: modules/facet > Reporter: Adrien Grand > Priority: Minor > > The facet module could leverage Weight#count in order to give fast counts for > the browsing use-case? -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org