[ 
https://issues.apache.org/jira/browse/LUCENE-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14246538#comment-14246538
 ] 

ASF subversion and git services commented on LUCENE-6106:
---------------------------------------------------------

Commit 1645618 from [~jpountz] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1645618 ]

LUCENE-6106: Improve tracking of filter usage in LRUFilterCache.

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

Reply via email to