You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Arnold Bronley <ar...@gmail.com> on 2019/08/07 17:07:20 UTC

Using custom scoring formula

Hi,

I have a topic verctor calculated for each of the Solr document in a
collection. Topic vector is calculated using LDA (
https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation).  Now I want to
return the similar document to a given document from this collection. I can
simply use normalized dot product between the given vector and all other
vectors to see which one has product of ~1. That will tell me that those
are very similar documents. Is there a way to achieve this using Solr?

Re: Using custom scoring formula

Posted by Chee Yee Lim <ch...@gmail.com>.
Hi Arnold,

One way to approach this is to store the topic vector you calculated with
each of the associated Solr document into a pseudo-vector field (i.e.
formatted string field). Then parse the string field into actual vector for
calculation when you need it. Something similar to this,
https://github.com/saaay71/solr-vector-scoring. But note that the plugin
will not work out of the box for latest Solr version.

Best wishes,
Chee Yee

On Thu, 8 Aug 2019 at 01:07, Arnold Bronley <ar...@gmail.com> wrote:

> Hi,
>
> I have a topic verctor calculated for each of the Solr document in a
> collection. Topic vector is calculated using LDA (
> https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation).  Now I want to
> return the similar document to a given document from this collection. I can
> simply use normalized dot product between the given vector and all other
> vectors to see which one has product of ~1. That will tell me that those
> are very similar documents. Is there a way to achieve this using Solr?
>