# Scored based on element present in array

**URL:** <https://discuss.elastic.co/t/scored-based-on-element-present-in-array/59541>\
**Category:** Elasticsearch\
**Created:** [September 1, 2016, 11:28am UTC](https://discuss.elastic.co/t/scored-based-on-element-present-in-array/59541 "2016-09-01T11:28:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tominator](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tominator](https://discuss.elastic.co/u/Tominator)\
**Post date:** [September 1, 2016, 11:28am UTC](https://discuss.elastic.co/t/scored-based-on-element-present-in-array/59541/1 "2016-09-01T11:28:30Z")

</div>

Hi,

I would like to receive a score for my documents based on whether or not a value is present in an array, not on how many other values are in the array.

I have the query:

```
{
  "query": {
    "multi_match": {
      "query": "woody",
      "fields": [
        "brands"
      ]
    }
  }
}

```

This query returns the correct documents, that's not the issue. However, they receive a score based on the nr of other elements in the "brands" field. Documents with 5 brands get a score of 3.6665833, while those with 9 brands get a score of 2.3022978.

I know a valid reply would be "then what do you want the score to be?" My real query is a bit more complicated, with other things that influence the scoring as well. So in this simplified query, I would like all results to have the same score (since I don't want the nr of elements in the array to matter).

How can I accomplish this?

---

<div class="post-metadata">

**Author:** ![mainec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainec/32/5557_2.png) [@mainec](https://discuss.elastic.co/u/mainec)\
**Post date:** [September 1, 2016, 2:43pm UTC](https://discuss.elastic.co/t/scored-based-on-element-present-in-array/59541/2 "2016-09-01T14:43:53Z")

</div>

[elasticsearch - elastic search array score - Stack Overflow](http://stackoverflow.com/questions/30346557/elastic-search-array-score) is what I found online wrt. to your question. From the article:

> If you do not want to account for field length (fieldNorm) during the scoring you could disable norms for a field in the mapping.

Hope this helps,  
Isabel

---

<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:** [July 5, 2017, 10:23pm UTC](https://discuss.elastic.co/t/scored-based-on-element-present-in-array/59541/3 "2017-07-05T22:23:12Z")

</div>


