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

Christine Poerschke commented on SOLR-5730:
-------------------------------------------

bq. SolrIndexSearcher: 
qr.setSegmentTerminatedEarly(earlyTerminatingSortingCollector.terminatedEarly());
 – should we also set qr.partialResults?

No, I don't think so: {{qr.partialResults}} is used to indicate that _partial_ 
results were returned because the timeAllowed limit was exceeded. In comparison 
{{qr.segmentTerminatedEarly}} indicates that _full_ results were returned and 
we made use of the EarlyTerminatingSortingCollector which early terminated the 
collecting of at least one segment. Had we not early-terminated for any of the 
segments then the results would still have been the same full results. --- So 
why would anyone care about the qr.segmentTerminatedEarly flag in the response? 
If the flag is TRUE then the returned {{numFound}} will be potentially less 
than the numFound returned by an identical search that didn't 
segment-terminate-early. --- As an aside, "partialResults" in the response can 
also occur if there is no timeAllowed specified but shards.tolerant=true was 
specified and there was a problem talking to at least one of the shards.

> make Lucene's SortingMergePolicy and EarlyTerminatingSortingCollector 
> configurable in Solr
> ------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5730
>                 URL: https://issues.apache.org/jira/browse/SOLR-5730
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Christine Poerschke
>            Assignee: Christine Poerschke
>            Priority: Minor
>              Labels: blocker
>             Fix For: 5.5, master
>
>         Attachments: SOLR-5730-part1and2.patch, SOLR-5730-part1of2.patch, 
> SOLR-5730-part1of2.patch, SOLR-5730-part2of2.patch, SOLR-5730-part2of2.patch
>
>
> *Example configuration (solrconfig.xml) :*
> {noformat}
> -<mergePolicy class="TieredMergePolicy"/>
> +<mergePolicyFactory class="org.apache.solr.index.SortingMergePolicyFactory">
> +  <str name="wrapped.prefix">in</str>
> +  <str name="in.class">org.apache.solr.index.TieredMergePolicyFactory</str>
> +  <str name="sort">timestamp desc</str>
> +</mergePolicyFactory>
> {noformat}
> *Example use (EarlyTerminatingSortingCollector):*
> {noformat}
> &sort=timestamp+desc&segmentTerminateEarly=true
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to