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/15 12:07:13 UTC

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

     [ https://issues.apache.org/jira/browse/LUCENE-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand resolved LUCENE-6106.
----------------------------------
       Resolution: Fixed
    Fix Version/s: Trunk
                   5.0

> 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
>             Fix For: 5.0, Trunk
>
>         Attachments: LUCENE-6106.patch
>
>
> 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