You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2014/12/11 16:43:13 UTC

[jira] [Created] (LUCENE-6106) Improve FilterCachingPolicy statistics computation

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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org