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