You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Nik Everett (Jira)" <ji...@apache.org> on 2021/10/26 14:33:00 UTC
[jira] [Created] (LUCENE-10206) Implement O(1) count on query cache
Nik Everett created LUCENE-10206:
------------------------------------
Summary: 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
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org