You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (Jira)" <ji...@apache.org> on 2019/09/10 18:52:00 UTC

[jira] [Commented] (LUCENE-7282) search APIs should take advantage of index sort by default

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

Michael McCandless commented on LUCENE-7282:
--------------------------------------------

Do we optimize the case where an exact or range DV query clause is "congruent" with index sort?  E.g. say my index sort is a {{DocValues.NUMERIC}} field {{foobar}} and then my query has a clause {{foobar=17}} then we can efficiently per segment skip to the {{docid}} range for the value {{17}} even if the user did not index dimensional points for that field. I thought we had an issue open for this but I can't find it now ...

> search APIs should take advantage of index sort by default
> ----------------------------------------------------------
>
>                 Key: LUCENE-7282
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7282
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Priority: Major
>
> Spinoff from LUCENE-6766, where we made it very easy to have Lucene sort documents in the index (at merge time).
> An index-time sort is powerful because if you then search that index by the same sort (or by a "prefix" of it), you can early-terminate per segment once you've collected enough hits.  But doing this by default would mean accepting an approximate hit count, and could not be used in cases that need to see every hit, e.g. if you are also faceting.
> Separately, `TermQuery` on the leading sort field can be very fast since we can advance to the first docID, and only match to the last docID for the requested value.  This would not be approximate, and should be lower risk / easier.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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