# How the score is calculated in elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-the-score-is-calculated-in-elasticsearch/168728>\
**Category:** Elasticsearch\
**Created:** [February 17, 2019, 12:36pm UTC](https://discuss.elastic.co/t/how-the-score-is-calculated-in-elasticsearch/168728 "2019-02-17T12:36:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [February 17, 2019, 12:36pm UTC](https://discuss.elastic.co/t/how-the-score-is-calculated-in-elasticsearch/168728/1 "2019-02-17T12:36:31Z")

</div>

When I tries,  
GET /logstash-2019.02.17/doc/\_search  
{  
"query":{  
"match":{  
"response": "200"  
}  
}  
}  
The index logstash-2019.02.17 does have a field of "response" of type "text",  
"response" : {  
"type" : "text",  
"norms" : false,  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
But the result shows \_"_score" : 0.061875403_, why is it so low?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 17, 2019, 12:59pm UTC](https://discuss.elastic.co/t/how-the-score-is-calculated-in-elasticsearch/168728/2 "2019-02-17T12:59:16Z")

</div>

You can use `explain: true` in your query to get how the score is computed.

If you don't care about the score, I'd recommend using a `constant_score` Query: [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-constant-score-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-constant-score-query.html)

```auto
GET /logstash-2019.02.17/_search_search
{
    "query": {
        "constant_score" : {
            "filter" : {
                "term" : { "response" : "200"}
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2019, 12:59pm UTC](https://discuss.elastic.co/t/how-the-score-is-calculated-in-elasticsearch/168728/3 "2019-03-17T12:59:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
