Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LM Similarity returns all zero scores #15397

Closed
keikha opened this issue Dec 11, 2015 · 1 comment
Closed

LM Similarity returns all zero scores #15397

keikha opened this issue Dec 11, 2015 · 1 comment
Labels
discuss :Search/Search Search-related issues that do not fall into other categories

Comments

@keikha
Copy link

keikha commented Dec 11, 2015

When I use the LMDirichlet similarity I get back are all zero scores. Here is the steps to reproduce the problem:

  1. Created the index:

{ "settings": { "similarity": { "LMSimilarity": { "type": "LMDirichlet", "mu": 2500 } } }, "mappings": { "item": { "properties": { "title": { "type": "string", "similarity": "LMSimilarity" } } } } }

  1. Indexed two documents:

{"title":"This is a test for search similarity when we search by other search options."}
{"title”:”Search looks weird when use other search possibilities. Numbers are not clear. Just adding new stuff to make the document longer. Document norm looks weird."}

  1. Run a simple query:

{ "explain": "true", "query": { "match": { "title": "search" } } }

If you look at the returned scores, there are multiple weird numbers:

  1. The score for all documents is zero
  2. The collection probability, a term property that is independent from individual documents, is different for each document. I expect this number to be the same for all documents for a given term.
  3. Document norm has a negative value, probably it's the log of another number, but I can't match these numbers to the LM formula.
@clintongormley clintongormley added discuss :Search/Search Search-related issues that do not fall into other categories labels Dec 14, 2015
@clintongormley
Copy link
Contributor

Closing in favour of #15345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

2 participants