Cosine Similarity ElasticSearch

Hi,

I'm using elasticsearch to index documents and then, with an other document, I score similarity using the "more_like_this" query.
Just two questions:

Does the "more_like_this" query use cosine similarity to score documents (I've read the documentation, but I'm still not sure)?
There is a way to get the scores between 0 and 1?

Thanks!

1 Like

I am also interested in this question.

I have found a fairly old code snippet [1] to calculate the cosine
similarity in lucene, but I was wondering if elasticsearch provided an
easier API to access this information.

[1]

Hi,

I'm using elasticsearch to index documents and then, with an other
document,
I score similarity using the "more_like_this" query.
Just two questions:

Does the "more_like_this" query use cosine similarity to score documents
(I've read the documentation, but I'm still not sure)?
There is a way to get the scores between 0 and 1?

Thanks!

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Cosine-Similarity-ElasticSearch-tp4060620.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6a2e446d-ec13-4db6-8cff-651ab5108235%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

There is someone that can help us?

Thank you very much!

Hello Rick ,

MLT query translates the source document into a normal boolean terms query.
This query is fired against the index and a normal TF IDF is used to find
the score.
AFAIK this is the working of MLT.

Thanks
Vineeth

On Fri, Aug 1, 2014 at 2:11 PM, RickDast chiccobia@gmail.com wrote:

There is someone that can help us?

Thank you very much!

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Cosine-Similarity-ElasticSearch-tp4060620p4061039.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1406882502942-4061039.post%40n3.nabble.com
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5n_Gk7AiDFywUnb-AQ5e-Z2k6GCCvORGBS8SN2Htj9hdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

I found some native script codings from Igor Motov
here: https://github.com/imotov/elasticsearch-native-script-example/blob/master/src/main/java/org/elasticsearch/examples/nativescript/script/CosineSimilarityScoreScript.java

and now playing with it

Alex

On Friday, August 1, 2014 11:53:24 AM UTC+3, Federico Bianchi wrote:

There is someone that can help us?

Thank you very much!

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Cosine-Similarity-ElasticSearch-tp4060620p4061039.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5b9025dd-0173-4b09-ae09-31a2f78e99d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.