You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Adrien Grand (Jira)" <ji...@apache.org> on 2021/10/27 09:34:00 UTC
[jira] [Resolved] (LUCENE-10206) Implement O(1) count on query
cache
[ https://issues.apache.org/jira/browse/LUCENE-10206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrien Grand resolved LUCENE-10206.
-----------------------------------
Fix Version/s: main (9.0)
Resolution: Fixed
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org