# Score values different than Lucene ones

**URL:** <https://discuss.elastic.co/t/score-values-different-than-lucene-ones/178066>\
**Category:** Elasticsearch\
**Created:** [April 23, 2019, 3:36pm UTC](https://discuss.elastic.co/t/score-values-different-than-lucene-ones/178066 "2019-04-23T15:36:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Salvanesch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_salvanesch/32/44646_2.png) [@Christian\_Salvanesch](https://discuss.elastic.co/u/Christian_Salvanesch)\
**Post date:** [April 23, 2019, 3:36pm UTC](https://discuss.elastic.co/t/score-values-different-than-lucene-ones/178066/1 "2019-04-23T15:36:47Z")

</div>

Hi,

we are migrating from Lucene to ElasticSearch. We use "query\_string" in order to execute the same (almost) queries we did previously on Lucene.  
Queries works good, but the \_score provided is pretty different than the Lucene one. It is not only the value itself but the sorting order results different.

Is the scoring on Elastic expected to be the same as Lucene? It seems so by reading documentation. Is there some special configuration to achieve this?

I tried changing "score\_mode" and "boost\_mode" in the "function\_score" part but without luck.

Here a query example:

```
{
  "from": 0,
  "query": {
    "function_score": {
      "score_mode": "sum",
      "boost_mode": "sum",
      "functions": [
        {
          "field_value_factor": {
            "field": "Boost"
          }
        }
      ],
      "query": {
        "query_string": {
          "query": "... my query in Lucene query syntax..."
        }
      }
    }
  },
  "size": 10,
  "sort": [
    {
      "_score": {
        "order": "desc"
      }
    }
  ]
}
```

---

<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:** [May 21, 2019, 3:36pm UTC](https://discuss.elastic.co/t/score-values-different-than-lucene-ones/178066/2 "2019-05-21T15:36:50Z")

</div>

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