your query runs in parallel on multiple shards and score you seeing is computed independently on every shard the default similarity is tf/idf based, which means it is using terms frequency across all documents (so your score on the shard will depend on data on this shard) for score to be this same, every shard will have to have more or less this same documents
you can change search_type to compute score when combining results from shards (slower): http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html also check this out (to learn more about similarity algorithms used by elasticsearch): http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html because you are searching for user names, it is possible that you could wrap your query in constant (or function) score query and settle for less granular scoring: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html Cheers, Karol Gwaj On Monday, February 17, 2014 11:00:47 AM UTC, Vallabh Bothre wrote: > > Dear Friends, > > I am using phonetic analysis in elasticsearch to search best results. > > When i search keyword lets say "McDonald" elastic search returns many > listings with "McDonald's" but some of these have differrent scores. > > I am manipulating results based on score and due to this difference its > affecting my functionality. > > All returned listings with "McDonald" have same case and are exact. > > For Ex: > *Name score* > McDonald's *5.8059134* > McDonald's 5.8059134 > McDonald's 5.8059134 > McDonald's *5.7834973* > McDonald's 5.7834973 > McDonald's *5.4078074* > > > As shown in example above there are 3 different scores which are > highlighted. > > Any help is very much appreciated. > > Regards, > Vallabh > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/58f4e7c8-c785-4e5b-96d3-33148c780055%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
