[ 
https://issues.apache.org/jira/browse/SOLR-17951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris M. Hostetter updated SOLR-17951:
--------------------------------------
    Attachment: SOLR-17951.patch
        Status: Open  (was: Open)

> 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
>            Priority: Major
>         Attachments: 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]

Reply via email to