[
https://issues.apache.org/jira/browse/SOLR-17951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077714#comment-18077714
]
Houston Putman edited comment on SOLR-17951 at 5/1/26 7:11 PM:
---------------------------------------------------------------
[~hossman] I think this might have broken compilation checks:
{quote}/tmp/src/solr/solr/core/src/java/org/apache/solr/search/ReRankOperator.java:28:
warning: [ImmutableEnumChecker] enums should be immutable: 'ReRankOperator'
has field 'op' of type 'java.util.function.DoubleBinaryOperator', the
declaration of type 'java.util.function.DoubleBinaryOperator' is not annotated
with @com.google.errorprone.annotations.Immutable
private final DoubleBinaryOperator op;
{quote}
was (Author: houston):
[~hossman] I think this might have broken compilation checks:
{quote}{{/tmp/src/solr/solr/core/src/java/org/apache/solr/search/ReRankOperator.java:28:
warning: [ImmutableEnumChecker] enums should be immutable: 'ReRankOperator'
has field 'op' of type 'java.util.function.DoubleBinaryOperator', the
declaration of type 'java.util.function.DoubleBinaryOperator' is not annotated
with @com.google.errorprone.annotations.Immutable }}
{{ private final DoubleBinaryOperator op;}}{quote}
> Optimize re-ranking based on "functions"
> ----------------------------------------
>
> Key: SOLR-17951
> URL: https://issues.apache.org/jira/browse/SOLR-17951
> Project: Solr
> Issue Type: Improvement
> Reporter: Chris M. Hostetter
> Assignee: Chris M. Hostetter
> Priority: Major
> Fix For: main(11.0), 10.1
>
> Attachments: SOLR-17951-1.patch, SOLR-17951.patch
>
>
> Lucene 10.3 added a {{DoubleValuesSourceRescorer}} alternative to the
> existing {{QueryRescorer}} as way to re-rank documents based on
> {{DoubleValues}} w/o needing the overhead of a query wrapper.
> I took a stab at refactoring the existing logic in {{ReRankQParserPlugin}} to
> try and "optimize" situations where the {{reRankQuery}} is a "function" based
> query by unwrapping it to get the underlying {{ValueSource}} (or
> {{DoubleValuesSource}}) -- similar to how {{QParser.parseAsValueSource()}}
> avoids an unnecessary {{QueryValueSource}} wrapper if the underlying QParser
> returns a "function" query.
> ie: make this faster...
> {noformat}
> rq={!rerank reRankQuery=$rrq}
> rrq={!func}something(cool)
> {noformat}
> I'll attach my patch, but (un)fortunately it caused
> {{TestDenseVectorFunctionQuery}} to help uncover [a lucene
> bug|https://github.com/apache/lucene/issues/15328] in
> {{VectorSimilarityFunction}} ... so we should either wait for that to be
> fixed, or perhaps write our own substitute for
> {{ValueSource.asDoubleValuesSource()}} that _explicitly_ calls
> {{floatVal(doc)}} to work around the issue
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]