lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (SOLR-5730) make Lucene's SortingMergePolicy and EarlyTerminatingSortingCollector configurable in Solr
Date Fri, 07 Mar 2014 14:38:54 GMT


Robert Muir commented on SOLR-5730:

Hello, some things that might simplify some of the TODOs, is we changed the SortingMergePolicy
API in LUCENE-5493 to just take Sort.

This means you can have multiple fields, they dont have to be numeric docvalues, and so on.
So I think this can simplify the configuration of this thing too, e.g. you could just take
a standard "sort spec string" and parse it with QueryParsing.getSort or whatever (some refactoring
might be needed here). 

It would be good though, to check that Sort.needsScores() == false, as that makes no sense
at index-time... I'll open an issue to add this check to SortingMergePolicy itself in lucene.

The other difference is, EarlyTerminatingSortingCollector now also takes a Sort, except really
you should just pass the Sort being used for the Query (it does the proper checking against
the segments to see if the segment was sorted in a compatible way, and if so, will optimize
with early termination). Today this just checks that they are exactly equal, but in the future
it can be smarter (LUCENE-5499).

Hopefully this makes the integration easier.

> make Lucene's SortingMergePolicy and EarlyTerminatingSortingCollector configurable in
> ------------------------------------------------------------------------------------------
>                 Key: SOLR-5730
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Christine Poerschke
>            Priority: Minor
> Example configuration:
> solrconfig.xml
> {noformat}
> <mergeSorter class="org.apache.solr.update.DefaultMergeSorterFactory"/>
> {noformat}
> schema.xml
> {noformat}
> <mergeSorterKey class="org.apache.solr.schema.SingleFieldSorterFactory">
>   <str name="fieldName">timestamp</str>
>   <bool name="ascending">false</bool>
> </mergeSorterKey>
> {noformat}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message