# Boost score if query contains all tokens in the field

**URL:** <https://discuss.elastic.co/t/boost-score-if-query-contains-all-tokens-in-the-field/337551>\
**Category:** Elasticsearch\
**Created:** [July 4, 2023, 10:31am UTC](https://discuss.elastic.co/t/boost-score-if-query-contains-all-tokens-in-the-field/337551 "2023-07-04T10:31:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siah\_Wei\_Chong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siah_wei_chong/32/121815_2.png) [@Siah\_Wei\_Chong](https://discuss.elastic.co/u/Siah_Wei_Chong)\
**Post date:** [July 4, 2023, 10:31am UTC](https://discuss.elastic.co/t/boost-score-if-query-contains-all-tokens-in-the-field/337551/1 "2023-07-04T10:31:17Z")

</div>

I am new to Elasticsearch.  
I am working off [Search for an address](https://discuss.elastic.co/t/search-for-an-address/186720/1)

My query looks like this

```auto
GET all_address/_search 
{
  "explain":true,
  "query":{
    "multi_match": {
      "query": "Flat 1, Floor 1, Raymond Court",
      "fields": [......],
      "type": "most_fields"
    }
  } 
}

```

The correct address has third highest score.(15 which is kinda low) I have tried best\_fields as well but the top scoring address still is the same irrelevant address. (Reason: The irrelevant address has "Court 1" in it's building name which caused it to win out).

I see that the address I want has the field "EstateName": "Raymond Court".

It is often the case where the correct match would have a field could be fully matched by the query such as "Flat A,X,Victoria Road" and not be the top scorer despite "StreetName": "Victoria Road" and lose out to another address that has "Victoria A"in it's fields

Is there a way to boost the score if a field could be fully matched?

---

<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:** [August 1, 2023, 10:31am UTC](https://discuss.elastic.co/t/boost-score-if-query-contains-all-tokens-in-the-field/337551/2 "2023-08-01T10:31:29Z")

</div>

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