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

Adrien Grand commented on LUCENE-8060:
--------------------------------------

I'd like to avoid IndexSearcher doing "nothing" or "everything". "everything" 
has the downside that it makes queries slow. On the other hand I'm concerned 
that the "nothing" approach is not very usable in practice as it is hard to 
build a UI with pagination, which I see is a very common need. I wouldn't like 
that simple use-cases can't use the simple search() methods on IndexSearcher 
and need to create collectors manually.

It is true that a value of 1000 or 10,000 feels arbitrary and might not be 
ideal for everybody depending on data volumes or use-case, but maybe we could 
add a setter on IndexSearcher?

> Require users to tell us whether they need total hit counts
> -----------------------------------------------------------
>
>                 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