Implementing Custom Scorer in Solr 8.6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Implementing Custom Scorer in Solr 8.6

Satish Silveri
Hi all,

I am trying to implement a custom scorer or you can say upgrading the version of the following plugin;

https://github.com/saaay71/solr-vector-scoring

The above plugin was developed on Solr 6.6 and I want to implement the same on Solr 8.6. While migrating the project, I came across 2 issues viz. CustomScoreQuery and CustomScoreProvider APIs are not part of Lucene 8.x.

I read the documentation and the contributors suggested using FunctionScoreQuery but there is no example of how to implement it. I read another thread on this channel and came to know about ValueSource API and found the below example;

http://www.solrtutorial.com/custom-solr-functionquery.html

but this also does not clearly indicate the actual method used to iterate over all documents and generate a custom score(cosine similarity between 2 BERT embeddings).

Any help would be appreciated!