# Boosting certain words/phrases in a should query?

**URL:** <https://discuss.elastic.co/t/boosting-certain-words-phrases-in-a-should-query/233850>\
**Category:** Elasticsearch\
**Created:** [May 22, 2020, 6:35am UTC](https://discuss.elastic.co/t/boosting-certain-words-phrases-in-a-should-query/233850 "2020-05-22T06:35:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijith\_chandran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhijith_chandran/32/60470_2.png) [@abhijith\_chandran](https://discuss.elastic.co/u/abhijith_chandran)\
**Post date:** [May 22, 2020, 6:35am UTC](https://discuss.elastic.co/t/boosting-certain-words-phrases-in-a-should-query/233850/1 "2020-05-22T06:35:13Z")

</div>

Hi,  
I am using the following query:

```auto
{
    "_source": [
        "title",
        "bench",
        "id_",
        "court",
        "date",
        "content"
    ],
    "size": 15,
    "from": 0,
    "query": {
        "bool": {
            "must": [
                {
                    "multi_match": {
                        "query": "london",
                        "fields": [
                            "title",
                            "content"
                        ]
                    }
                }
            ],
            "should": [
                {
                    "multi_match": {
                        "query": "London is a beautiful city and has a lot of amazing landmarks. I love the Thames!",
                        "fields": [
                            "title",
                            "content^2"
                        ],
                        "operator": "or"
                    }
                }
            ]
        }
    },
    "highlight": {
        "pre_tags": [
            "<tag1>"
        ],
        "post_tags": [
            "</tag1>"
        ],
        "fields": {
            "content": {}
        },
        "number_of_fragments": 5,
        "fragment_size": 300
    }
}

```

The rational of the query is that the word `London` must be present while those in the `should` query should just boost the score. What I would like to do is that within the should query, I would like to boost the phrase `beautiful city` and the word `Thames`. How do I do it?

PS: `Content` and `Title` are standard text fields with no analyzers applied on them.

Regards

---

<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:** [June 19, 2020, 6:35am UTC](https://discuss.elastic.co/t/boosting-certain-words-phrases-in-a-should-query/233850/2 "2020-06-19T06:35:22Z")

</div>

Closed on June 19, 2020, 6:35am UTC

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