You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2016/02/02 19:11:39 UTC

[jira] [Comment Edited] (SOLR-5730) make Lucene's SortingMergePolicy and EarlyTerminatingSortingCollector configurable in Solr

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

Shai Erera edited comment on SOLR-5730 at 2/2/16 6:10 PM:
----------------------------------------------------------

[~hossman], this issue is now on hold until we finish with SOLR-8621 (see [~cpoerschke] earlier comment).

[~jkrupan] the intention of SOLR-8621 and this issue is to allow users to define compound merge policies in {{solrconfig.xml}} with ease. Currently, it's impossible and if you want to use something like {{UpgradeIndexMergePolicy}}, you have to create your own MP class which will delegate internally to {{UpgradeIndexMP}}. For users who still want to define simple merge policies like {{TieredMergePolicy}}, the structure in the XML will not be much different. Instead of:

{code}
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
  <int name="segmentsPerTier">42</int>
</mergePolicy>
{code}

They will need to specify

{code}
<mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
  <int name="segmentsPerTier">42</int>
</mergePolicyFactory>
{code}

The factory allows more advanced users to create whatever MP they want, rather easily. Also, with this change, we deprecate some settings that are now defined globally (like _mergeFactor_), and move them inside the {{<mergePolicyFactory>}} section, where they belong.

Hope this clarifies it better.


was (Author: shaie):
[~hossman], this issue is now on hold until we finish with SOLR-8621 (see [~cpoerschke] earlier comment).

[~jkrupan] the intention of SOLR-8621 and this issue is to allow users to define compound merge policies in {{solrconfig.xml}} with ease. Currently, it's impossible and if you want to use something like {{UpgradeIndexMergePolicy}}, you have to create your own MP class which will delegate internally to {{UpgradeIndexMP}}. For users who still want to define simple merge policies like {{TieredMergePolicy}}, the structure in the XML will not be much different. Instead of:

{code}
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
  <int name="segmentsPerTier">42</int>
</mergePolicy>
{code}

They will need to specify

{code}
<mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
  <int name="segmentsPerTier">42</int>
</mergePolicy>
{code}

The factory allows more advanced users to create whatever MP they want, rather easily. Also, with this change, we deprecate some settings that are now defined globally (like _mergeFactor_), and move them inside the {{<mergePolicyFactory>}} section, where they belong.

Hope this clarifies it better.

> 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) - corresponding to latest attached patch:*
> {noformat}
> <sortMerges enable="true">
>   <str name="sort">timestamp desc</str>
> </sortMerges>
> {noformat}
> *Example configuration (solrconfig.xml) - corresponding to current (work-in-progress master-solr-8621) SOLR-8621 efforts:*
> {noformat}
> -<mergePolicy class="TieredMergePolicy"/>
> +<mergePolicyFactory class="SortingMergePolicyFactory">
> +  <str name="in">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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org