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

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

bq. I don't see a simplification, which is not a complaint but just wondering 
why you feel things are simpler Mike.

Indeed there is no real simplification here, it just splits the API into two 
classes.

bq. I had to implement my own FieldComparator yesterday and it was a bit of a 
pain, particularly because of the primitive type'ing inhibits a generic useful 
base class, and so I had to write my own. It would be nice if there was an int, 
long, float, and double set of base classes. There is kind of a set of these 
but they assume they fetch from DocValues. I think with some simple changes 
they could be generic, and only one abstract method to fetch the primitive 
value for the current document.

Maybe you could extend an existing FieldComparator to pull a NumericDocValues 
instance differently (or IntValues/LongValues/... on 4.x) like 
SortedNumericSortField does?

> 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