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

Hoss Man commented on LUCENE-8060:
----------------------------------

{quote}Based on your comments I am getting the feeling that you are leaning 
towards to exposing this configuration option, having a sensible default and 
pointing users to creating collectors manually if they have more specific 
needs, do I get it right?
{quote}
I dunno ... i like your TotalHits proposal in LUCENE-8430, i like that if new 
users see that object they can read the docs and see that sometimes they might 
not get accurate counts, and that class can have javadoc links to ways they can 
ensure a higher threshold (or an unlimited threshold to force exact counts) ... 
i'm just not sure i like the idea of the TotalHits javadocs needing to link to 
two differnet ways of achieving the samething: an IndexSearcher config option 
to change the "defaults" _and_ a TopFieldCollector builder method that takes in 
a value ... seems clunky to me...

But to be clear: i don't have super strong feelings about the clunkiness. Happy 
to defer to you on this.  Just wanted to point out (in my last comment) why it 
felt weird to me.

> Enable top-docs collection optimizations by default
> ---------------------------------------------------
>
>                 Key: LUCENE-8060
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8060
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>             Fix For: master (8.0)
>
>
> We are getting optimizations when hit counts are not required (sorted 
> indexes, MAXSCORE, short-circuiting of phrase queries) but our users won't 
> benefit from them unless we disable exact hit counts by default or we require 
> them to tell us whether hit counts are required.
> I think making hit counts approximate by default is going to be a bit trappy, 
> so I'm rather leaning towards requiring users to tell us explicitly whether 
> they need total hit counts. I can think of two ways to do that: either by 
> passing a boolean to the IndexSearcher constructor or by adding a boolean to 
> all methods that produce TopDocs instances. I like the latter better but I'm 
> open to discussion or other ideas?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to