You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Malgorzata Urbanska <ur...@cs.colostate.edu> on 2013/07/21 09:14:14 UTC
raw cosine similarity
Hi,
I would like to calculate raw cosine similarity between query and
document. I read documentation about lucene scoring but I'm still
confused. Does exist any implementation in Luscen 4.3.0 to do that. If
not, what is the easiest way to do this.
So far I'm retrieving a TermVector for document but I'm a little bit
lost. I do not know what should I do next.
Thanks
--
gosia
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: raw cosine similarity
Posted by lukai <lu...@gmail.com>.
It's not hard to implement one. Store your term value of your document with
payload. Then create your own Query and override the score function with
your cosine similarity logic.
The problem here is you need to watch out the performance, especially for
terms have very high DF. It may decrease your query performance a lot.
Thanks,
On Sun, Jul 21, 2013 at 12:14 AM, Malgorzata Urbanska <
urbanska@cs.colostate.edu> wrote:
> Hi,
>
>
> I would like to calculate raw cosine similarity between query and
> document. I read documentation about lucene scoring but I'm still
> confused. Does exist any implementation in Luscen 4.3.0 to do that. If
> not, what is the easiest way to do this.
>
> So far I'm retrieving a TermVector for document but I'm a little bit
> lost. I do not know what should I do next.
>
> Thanks
>
>
> --
> gosia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>