[ https://issues.apache.org/jira/browse/SOLR-5730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15109905#comment-15109905 ]
Tomás Fernández Löbbe commented on SOLR-5730: --------------------------------------------- This feature sounds really good. I have some questions/comments: I'm wondering if its better to have the {{segmentTerminateEarly}} parameter or if we should just use the {{EarlyTerminatingSortingCollector}} whenever the MP is {{SortingMergePolicy}} and the sort spec is compatible. Or maybe the default should be "use it if possible", and if the parameter is explicitly set to true, use it if possible, and error if not? If the parameter is set to "false", don't use the collector even if possible. Looking at this {noformat} + if (segmentTerminatedEarly != null) { + final Object existingSegmentTerminatedEarly = rb.rsp.getResponseHeader().get(SolrQueryResponse.RESPONSE_HEADER_SEGMENT_TERMINATED_EARLY_KEY); + if(existingSegmentTerminatedEarly == null) { + rb.rsp.getResponseHeader().add(SolrQueryResponse.RESPONSE_HEADER_SEGMENT_TERMINATED_EARLY_KEY, segmentTerminatedEarly); + } else if (!segmentTerminatedEarly.equals(existingSegmentTerminatedEarly)) { + rb.rsp.getResponseHeader().remove(SolrQueryResponse.RESPONSE_HEADER_SEGMENT_TERMINATED_EARLY_KEY); + rb.rsp.getResponseHeader().add(SolrQueryResponse.RESPONSE_HEADER_SEGMENT_TERMINATED_EARLY_KEY, segmentTerminatedEarly); + } + } {noformat} If there is an existing value, the new one should be {{existing OR new}}, right? If we want the per shard information we could add that to the shards_info section. > 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 > Attachments: SOLR-5730-part1of2.patch, SOLR-5730-part2of2.patch > > > *Example configuration (SortingMergePolicy):* > solrconfig.xml > {noformat} > <useSortingMergePolicy>true</useSortingMergePolicy> > {noformat} > schema.xml > {noformat} > <mergeSortSpec>timestamp desc</mergeSortSpec> > {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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org