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

Shai Erera commented on SOLR-5730:
----------------------------------

Rethinking my proposal, I'm not sure chaining merge policies is the right 
approach. What does it mean if I chain LogMergePolicy and TieredMergePolicy? 
How about if we introduce a MergePolicyPlugin/Factory, which would allow one to 
implement whatever MergePolicy he wants (including wrapping others). And we 
introduce out-of-the-box a SortingMergePolicyPlugin/Factory which takes flat 
attributes to initialize itself, e.g.:

{noformat}
  <mergePolicyPlugin class="solr.SortingMergePolicyPlugin">
    <sort>f1 desc, f2 asc, ... </sort>
    <delegate.class>solr.TieredMergePolicy"</delegate.class>
    <delegate.mergeFactor>10</delegate.mergeFactor>
  </mergePolicyPlugin>
{noformat}

Alternatively, if this works too, it's better IMO:

{noformat}
  <mergePolicyPlugin class="solr.SortingMergePolicyPlugin">
    <sort>f1 desc, f2 asc, ... </sort>
    <delegate class="solr.TieredMergePolicy"
              mergeFactor="10"
              ...
    </delegate>
  </mergePolicyPlugin>
{noformat}

> 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-part1of2.patch, 
> SOLR-5730-part2of2.patch, SOLR-5730-part2of2.patch
>
>
> *Example configuration (solrconfig.xml):*
> {noformat}
> <sortMerges enable="true">
>   <str name="sort">timestamp desc</str>
> </sortMerges>
> {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