Getting maximum score in a should clause query in Elastic Search
<p>I have a multi match query with a should clause. The intent of the query is to get all the results containing either jdk or java or both. The query is as follows</p>

<pre><code>{
"fields": [
    "id",
    "name"
],
"query": {
    "filtered": {
        "filter": {
            "bool": {
                "should": [
                    {
                        "term": {
                            "city": "12018206"
                        }
                    }
                ]
            }
        },
        "query": {
            "bool": {
                "should": [
                    {
                        "multi_match": {
                            "query": "jdk",
                            "fields": [
                                "name^6",
                                "description^3"
                            ],
                            "tie_breaker": 0.3,
                            "type": "best_fields",
                            "boost": 10
                        }
                    },
                    {
                        "multi_match": {
                            "query": "java",
                            "fields": [
                                "name^6",
                                "description^3"
                            ],
                            "tie_breaker": 0.3,
                            "type": "best_fields",
                            "boost": 10
                        }
                    }
                ]
            }
        }
    }
}}
</code></pre>

<p>The final score generated by this query is the average of the score of each item in the should clause. What I want is the maximum of score obtained by each item in should clause. </p>

<p>Can any one please tell me what changes i need to make. </p>

<p>Thanks</p>