You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Michael Gibney (Jira)" <ji...@apache.org> on 2020/08/21 17:29:00 UTC

[jira] [Commented] (SOLR-14765) optimize DocList creation by skipping sort for sort-irrelevant cases

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

Michael Gibney commented on SOLR-14765:
---------------------------------------

Thanks, [~mdrob]! I just added a CHANGES.txt entry. I'll also explicitly call out that there are some {{nocommit}} comments in the code. Most of these are questions about how to handle some of the "whitebox" test assumptions about how/when caching is expected to work. {{ExitableDirectoryReaderTest}} tests cache hit assumptions in ways that can (newly?) crosstalk between different tests, but other than that I would propose either updating code to accommodate new behavior, or leaving the current workarounds in place (effectively disabling the new optimization) and adding some additional lines to check the new "optimized" behavior.

The other {{nocommit}} marks where this optimization is disabled for the {{cursorMark}} case. I'm inclined to just leave that as-is (optimization disabled for {{cursorMark}}) but in principle I think there might be a way to enable the optimization even in the {{cursorMark}} case?

As far as the "safety" of this commit affecting such a central codepath, it's kind of a double-edged sword: on the one hand, I think it should be covered well by existing tests across the test suite (all of which pass); on the other hand (wrt peformance), because it has the potential to affect cache usage patterns, we should probably tread carefully and think through the possible negative consequences for some use patterns. (That said, for the majority of use patterns I think there would be essentially _no_ change, and for the majority of _affected_ use patterns I think change would be significantly positive ...)

> optimize DocList creation by skipping sort for sort-irrelevant cases
> --------------------------------------------------------------------
>
>                 Key: SOLR-14765
>                 URL: https://issues.apache.org/jira/browse/SOLR-14765
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: master (9.0)
>            Reporter: Michael Gibney
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When {{rows=0}}, and for {{MatchAllDocsQuery}} and {{ConstantScoreQuery}} (and possibly others?), it is possible for {{SolrIndexSearcher.getDocListC(QueryResult, QueryCommand)}} to create a DocList directly from {{filterCache}} DocSets -- similar to {{useFilterForSortedQuery}}, but without actually sorting. 
> This results in significant benefits for high-recall domains, including the common (and commonly-cached) use-case of {{q=\*:*}} and {{fq}}, facets, etc.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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