The default scoring algorithm is based on TF-IDF. http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/practical-scoring-function.html http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/scoring-theory.html
You can enable explain to see how documents are scored: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-explain.html Without knowing more about your system, I suspect it is the IDF that is causing the mismatch. The IDF is calculated per shard, so if when your documents come from different shards, the scores can be different. Try using a distributed search type (dfs_query_then_fetch) to see if the issue still persists: http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_search_options.html#search-type Cheers, Ivan On Tue, Oct 28, 2014 at 3:38 PM, Manuel Sciuto <[email protected]> wrote: > Hello > > How is score calculated? > > GET /business/actividades,alojamiento,comida,transporte_&_servicios/_search > { > "query": { > "filtered": { > "query": { > "match": { > "name": "Sheraton" > } > } > } > } > } > > Response > > { > "took": 4, > "timed_out": false, > "_shards": { > "total": 5, > "successful": 5, > "failed": 0 > }, > "hits": { > "total": 506, > "max_score": 6.8087983, > "hits": [ > { > "_index": "business", > "_type": "alojamiento", > "_id": "273825", > "_score": 6.8087983, > "_source": { > "name": "Sheraton", > "reviews": 2 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "252355", > "_score": 6.8087983, > "_source": { > "name": "Sheraton", > "reviews": 1 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "132774", > "_score": 6.8087983, > "_source": { > "name": "Sheraton", > "reviews": 1 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "225509", > "_score": 6.8087983, > "_source": { > "name": "Sheraton", > "reviews": 2 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "232124", > "_score": 6.8087983, > "_source": { > "name": "Sheraton", > "reviews": 1 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "219172", > * "_score": 6.8087983,* > "_source": { > "name": "Sheraton", > "reviews": 0 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "224180", > * "_score": 6.7636743,* > "_source": { > "name": "Sheraton", > "reviews": 3 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "268979", > "_score": 6.7636743, > "_source": { > "name": "Sheraton", > "reviews": 12 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "228353", > "_score": 6.7636743, > "_source": { > "name": "Sheraton", > "reviews": 2 > } > }, > { > "_index": "business", > "_type": "alojamiento", > "_id": "112508", > "_score": 6.7636743, > "_source": { > "name": "Sheraton", > "reviews": 9 > } > } > ] > } > } > > Because the score is different in some cases? If the name is the same > > Thanks!! > > > -- > 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/bcaf4e31-f64a-4cc7-8b2f-986212216b9c%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/bcaf4e31-f64a-4cc7-8b2f-986212216b9c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCmXPjzLqmz_J8%3DKHYDHOM92yX5EVj1CePWCzW%3DMkmYuA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
