hossman opened a new issue, #15328:
URL: https://github.com/apache/lucene/issues/15328

   ### Description
   
   `VectorSimilarityFunction` (and it's concrete subclasses) are the only 
`ValueSource` impls (AFAICT) that produce `FunctionValues` impls which _**do**_ 
override `floatVal(doc)` but do **NOT** override `doubleVal(doc)` -- so they 
inherits the default impl from the `FunctionValues` abstract class, throwing 
`UnsupportedOperationException`
   
   Practically speaking this means `VectorSimilarityFunction` subclasses are 
the only `ValueSource` impls (AFAICT) that _**can**_ be used in a 
`FunctionQuery`, but can **NOT** be used in a `FunctionScoreQuery` because 
`ValueSource.asDoubleValuesSource()` delegates to the `doubleVal(doc)`
   
   ### Version and environment details
   
   Affects main, and all previous versions of Lucene that contain 
`VectorSimilarityFunction`
   
   Fix (with tests) is fairly straight forward: 
[lucene.bug.VectorSimilarityFunction.doubleVal.patch.txt](https://github.com/user-attachments/files/22858305/lucene.bug.VectorSimilarityFunction.doubleVal.patch.txt)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to