# ElasticSearch 7.5.2: Scores must be positive or null exception

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872>\
**Category:** Elasticsearch\
**Created:** [March 24, 2020, 3:33pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872 "2020-03-24T15:33:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bram](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bram](https://discuss.elastic.co/u/bram)\
**Post date:** [March 24, 2020, 3:33pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872/1 "2020-03-24T15:33:33Z")

</div>

Hello,

We're getting this exception from ElasticSearch for one specific search term:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Scores must be positive or null"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "reason": {
          "type": "illegal_argument_exception",
          "reason": "Scores must be positive or null"
        }
      }
    ],
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "Scores must be positive or null",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Scores must be positive or null"
      }
    }
  },
  "status": 400
}

```

The search clause that causes this:  
multi\_match, with type "cross\_fields" and "tie\_breaker" between 0.0 and 1.0.

The query works with a different type setting, and/or without the tie\_breaker setting.

Does anyone know how to resolve this? So it works with these settings?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 24, 2020, 4:28pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872/2 "2020-03-24T16:28:13Z")

</div>

I know this might be tricky, but is there chance for a small reproduction?

Also, can you share the output of the search with the parameter [`error_trace=true`](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/common-options.html#common-options-error-options) and paste the full stack trace here? That might already help to see where this is coming from.

Also, is this a cluster where all data has been indexed under 7.x (not an upgrade from 6.x)?

---

<div class="post-metadata">

**Author:** ![bram](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bram](https://discuss.elastic.co/u/bram)\
**Post date:** [March 24, 2020, 5:47pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872/3 "2020-03-24T17:47:13Z")

</div>

We were not able to reproduce it in a smaller test index sorry, it also does seem to only happen with querystrings with lots of results (10k+).  
\_count gives 19594 documents in the index.

The cluster has had upgrades from 6.5 -\> 6.7 -\> 7.0 -\> 7.2 -\> 7.5.2. But this specific index has been created under 7.5.2.

Output with error\_trace=true: [https://pastebin.com/d8wWMEFS](https://pastebin.com/d8wWMEFS)  
(sorry, was not able to post it here because of size limits)

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 30, 2020, 1:47pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872/4 "2020-03-30T13:47:41Z")

</div>

can you also provide the full query with `explain: true` in it, and put that output in another pastebin?

Thanks a lot!

---

<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:** [April 27, 2020, 1:47pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872/5 "2020-04-27T13:47:48Z")

</div>

Automatically closed after 28 days.

---

<div class="post-metadata">

**Author:** ![joshdevins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdevins/32/62865_2.png) [@joshdevins](https://discuss.elastic.co/u/joshdevins)\
**Post date:** [October 29, 2020, 11:31am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-scores-must-be-positive-or-null-exception/224872/6 "2020-10-29T11:31:14Z")

</div>

This is caused by the following underlying bug: [https://github.com/elastic/elasticsearch/issues/44700](https://github.com/elastic/elasticsearch/issues/44700)
