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

Robert Muir commented on LUCENE-8040:
-------------------------------------

Its not saving a "lot". We are talking about microseconds here either way.

IndexSearcher does not *contain* the querycache. The caching is at the segment 
level. You just configure it by passing it in there.

Big difference: I'm strongly against caching on index searcher. especially for 
something that takes microseconds.

> Optimize IndexSearcher.collectionStatistics
> -------------------------------------------
>
>                 Key: LUCENE-8040
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8040
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>            Reporter: David Smiley
>            Assignee: David Smiley
>             Fix For: 7.2
>
>         Attachments: MyBenchmark.java, lucenecollectionStatisticsbench.zip
>
>
> {{IndexSearcher.collectionStatistics(field)}} can do a fair amount of work 
> because with each invocation it will call {{MultiFields.getTerms(...)}}.  The 
> effects of this are aggravated for queries with many fields since each field 
> will want statistics, and also aggravated when there are many segments.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to