FTS giving different score for documents with the exact same field value. Why is that?

Not really that hard a question :slight_smile:
This situation would typically occur in a partitioned index.

Firstly, worth mentioning here - the scoring algorithm that our search engine uses is tf-idf - which takes into account term frequency (that is rewarded) and number of documents the term occurs in (that is penalized).

Like I pointed out in your other ticket here, a search request that is received is individually applied to every partition and results are merged before responding to the user - so scores for the document hits generated are determined at a partition level.

=> Meaning regardless of the content within these documents being very alike, the score tends to differ based on the number of documents resident within each partition. Only if all the doc counts are equal among all the partitions would the scores end up alike.

This is a shortcoming with the tf-idf scoring algorithm, reason why we’re exploring other approaches like bm25 or perhaps even supporting a framework to support customized scoring (and not just simple boosting) in our future - hopefully sooner than later.

Until then if it is absolutely necessary to you for your query to generate the same _score for like documents - my only recommendation for now is to use a single partitioned index.