Adrien Grand created LUCENE-6106:
------------------------------------
Summary: Improve FilterCachingPolicy statistics computation
Key: LUCENE-6106
URL: https://issues.apache.org/jira/browse/LUCENE-6106
Project: Lucene - Core
Issue Type: Improvement
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
Currently FilterCachingPolicy.onCache is supposed to be called every time that
FilterCache.onCache is used. However, this does not necessarily reflect how
much a filter is used. For instance you can call cache and not use the filter,
or call cache once and then use it a hundred times. It would be more useful to
know how many times a filter has been used on a top level reader, and I think
we can do this by doing something like below in the caching wrapper filter?
{code}
@Override
public DocIdSet getDocIdSet(LeafReaderContext context, Bits acceptDocs)
throws IOException {
if (context.ord == 0) {
// increment counter
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]