[ https://issues.apache.org/jira/browse/LUCENE-10206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17434809#comment-17434809 ]
ASF subversion and git services commented on LUCENE-10206: ---------------------------------------------------------- Commit 941df98c3f718371af4702c92bf6537739120064 in lucene's branch refs/heads/hnsw from Nik Everett [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=941df98 ] LUCENE-10206 Implement O(1) count on query cache (#415) When we load a query into the query cache we always calculate the count of matching documents. This uses that count to power the new `O(1)` `Weight#count` method. > Implement O(1) count on query cache > ----------------------------------- > > Key: LUCENE-10206 > URL: https://issues.apache.org/jira/browse/LUCENE-10206 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Nik Everett > Priority: Minor > Fix For: main (9.0) > > Time Spent: 1h 10m > Remaining Estimate: 0h > > I'd like to implement the `Weight#count` method in `LRUQueryCache` so cached > queries can quickly return their counts. We already have a count on all of > the bit sets we use for the query cache we just have to store it and "plug it > in". > > I got here because we frequently end up wanting to get counts and I saw hot > `RoaringDocIdSet`'s iterator hot spotting. I don't think it's slow or > anything, but when the collector is just `count++` the iterator is > substantial. It seems like we could frequently avoid the whole thing by > implementing `count` in the query cache. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org