[ 
https://issues.apache.org/jira/browse/SOLR-16675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739730#comment-17739730
 ] 

Elia Porciani commented on SOLR-16675:
--------------------------------------

Function queries for knn vectors have been introduced in Lucene 9.7:

[https://github.com/apache/lucene/pull/12253]

 

I created a draft PR in solr for the new Lucene functionality and use KNN 
function queries for reranking purposes in Solr. Before merging the PR, it is 
necessary to wait for the update of the Lucene dependency to 0.7.

PR: https://github.com/apache/solr/pull/1750

> Introduce the possibility to rerank topK results with vector similarity 
> functions using DenseVectorField
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-16675
>                 URL: https://issues.apache.org/jira/browse/SOLR-16675
>             Project: Solr
>          Issue Type: Task
>            Reporter: Elia Porciani
>            Priority: Major
>
> When using knnQParser in reranking pay attention to the top-K parameter.
> The second pass score(deriving from KNN search) is calculated only if the 
> document d from the first pass is within the K nearest neighbors(in the whole 
> index) of the target vector to search.
> This is a current limitation.
> The final ranked list of results will have the first pass score(main query q) 
> combined with the second pass score(the approximated similarity function 
> distance to the target vector to search).
> Ideally, it should be possible to:
> * Rerank top K results with vector similarity. We should compute the vector 
> similarity function using the DenseVectorField value of all the documents in 
> top K results without the need of running a KNN query.
> * Use only the second pass score as the final score



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to