lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Munendra S N (JIRA)" <>
Subject [jira] [Commented] (SOLR-11758) Missing boolVal implementation in FloatDocValues
Date Fri, 15 Dec 2017 17:02:00 GMT


Munendra S N commented on SOLR-11758:

Adding further details to explain the need for this.
I wanted to boost some documents by fixed value if they match some condition

Here, problem was that even when document matched these condition it was not getting boosted.
Even though query($qq1) and query($qq2) both returned non-zero positive values (both values
were < 1).
In this case, I could have also used *exists* which would solve but I wanted to know the reason
for such behavior.

On debugging, I found that *FloatDocValues* which is base class for *QueryDocValues* doesn't
implement *boolVal* method, hence, *boolVal* of *FunctionValues* is called.
Ideally, *FloatDocValues* should have an implementation to override boolValue like how it
is done in *DoubleDocValues*.

> Missing boolVal implementation in FloatDocValues
> ------------------------------------------------
>                 Key: SOLR-11758
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Munendra S N
>            Priority: Minor
>         Attachments: SOLR-11758.patch
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> In case of *DoubleDocValues*, *boolVal(int doc)* has been implemented but this is missing
in case *FloatDocValues*.
> *Impact*: For any DocValues which extends *FloatDocValues* and doesn't implement *boolVal(int
doc)*, parent *boolVal* in FucntionValues would be called.
> boolVal implementation in FunctionValues
> {code:java}
>   @Override
>   public boolean boolVal(int doc) throws IOException {
>     return intVal(doc) != 0;
>   }
> {code}
> Let me know if I can work on it

This message was sent by Atlassian JIRA

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

View raw message