title: exact query search in elasticsearch
body: <p>I have this query that returns if the word "mumbai" appear anywhere in the title.</p>
  
  <pre><code>{
    "query": {
      "filtered": {
        "query": {
          "match_all": {}
        },
        "filter": {
          "term": {
            "title": "mumbai"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>So the result contains...</p>
  
  <pre><code>mumbai
  mumbai ports
  financial capital mumbai
  </code></pre>
  
  <p>I need to return only "mumbai" term and not the other documents where mumbai word is associated with other phrases. Only the first result is correct. How do I discard other results?</p>
  
  <hr>
  
  <p>update </p>
  
  <p>This query is working as expected and it lists the sort value 58 (random value) if the match is exact.</p>
  
  <pre><code>curl -XPOST "localhost:9200/enwiki_content/page/_search?pretty" -d'
  { 
      "fields": "title",
      "query": {
          "match": {"title": "Mumbai"}
      },
      "sort": {
      "_script": {
          "script":  "_source.title == \"Mumbai\" ? \"58\": \"78\";",
          "type": "string" 
  
  }
  }
  }'
  </code></pre>
  
  <p>I need to return the title where match is exact Mumbai (and hence the sort value 58). How do I filter or add the script to "fields" parameter?</p>