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

Adrien Grand commented on LUCENE-5702:
--------------------------------------

bq. I considered that but FieldComparator.LongComparator's constructor is 
package private

What version are you using? It seems to be public in the latest release.

bq. I'm sorting indirectly by looking up values in another document

Elasticsearch does something similar by allowing to sort eg. by the minimum 
value of all documents contained in a given block, maybe there is some logic 
you can reuse? 
https://github.com/elasticsearch/elasticsearch/blob/1.4/src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorSource.java#L64

bq. Two examples of a FieldComparator instances in Lucene that could benefit 
from some re-usable base classes are ExpressionComparator and 
ValueSourceComparator. There are probably others.

+1 to improve code reuse across comparators!

> Per-segment comparator API
> --------------------------
>
>                 Key: LUCENE-5702
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5702
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: Trunk
>
>         Attachments: LUCENE-5702.patch
>
>
> As a next step of LUCENE-5527, it would be nice to have per-segment 
> comparators, and maybe even change the default behavior of our top* 
> comparators so that they merge top hits in the end.



--
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