Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
odd scoring behaviour / inconsistent scoring #3521
unfortunately i wasn't able to reproduce this in the usual way, but here is the case:
I have a query such as
to the terms filter, i pass a list of ids(anywhere between 1 and 200k unique ids).
when executing this query multiple times i get different results. so, investigating a little i traced it to the score not being constant sometimes(not what i expected at all).
i ran the same query a few times with explain set to true and getting only the last document, and here is what i got:
so, here i would expect this query to ALWAYS have the same score, and also, that every document scores exactly the same.
** hope thats clear enough... but let me know if you need more info, or even the complete output for the explain(its pretty big)
hey @lmenezes, I am afraid but this is the expected behavior. there is a lot going on in this boolean query construct that depends on a number of factors. the only guarantee here is that it will be the same score for all docs. Yet the eventual score and the query norm depend on your similarity, with a similarity that doesn not modify the query norm I guess it'd be 1.0 across the board.
@s1monw that's the thing... i don't get a constant score for all documents. i do understand(also, don't care. not interested in the score for this case) that running the same query multiple times might result in different scores. but, for the same execution the documents should all score the same, right? if so, then there is something wrong here.
i tried pretty hard myself to write an example that worked(got 2 documents with different scores) here and wasn't able to.
i could not reproduce that into my staging environment, only on live. the difference between staging and live at the moment, is that staging is not getting updates and has no replicas(if this info might help).
would setting explain -> true, and getting all the results help? its a pretty big response...