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

Uwe Schindler commented on LUCENE-5837:
---------------------------------------

Hi Adrien,

it is somehow a specialization - on the docvalues instance. You may be right - 
you can also see it as simplifcication. In any case you have to take care that 
the v==0 optimization is still done, which you do (as I see)

What happens in case "missingValue==null" (which was possible in the old API)? 
I am not 100% sure if the current code does the right thing - but if tests pass 
I am fine.

I don't like the crazy API around the missingValue declared as "long" in the 
abstract base class. This is very confusing. Especially because the generics 
enfore a real type which is removed here. At least make the constructor of the 
abstract base class hidden - or hide the whole abstract base class 
(NumericComparator). I am not sure if it needs to be public at all. 

If this does not slow down, go for it!

How to handle that in Lucene 4.x? The API still uses FieldCache.DEFAULT there 
and the order of calls for getDocsWithField() is important.

> Only check docsWithField when necessary in numeric comparators
> --------------------------------------------------------------
>
>                 Key: LUCENE-5837
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5837
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 5.0, 4.10
>
>         Attachments: LUCENE-5837.patch, LUCENE-5837.patch
>
>
> Our numeric comparators have branches to deal with missing values. However 
> there are some cases when checking docs that have a field is not useful:
>  - if all docs have a value
>  - if no docs have a value
>  - if the missing value is 0



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to