0

I want to search in documents which some words in one filed are more important than others,

For example:

US intelligence believes North Korea is making more nuclear bomb fuel despite talks

Is there a way to Elasticsearch understand it? Some thing like this:

US^5 intelligence believes (North Korea)^10 is making more (nuclear bomb)^8 fuel despite talks
Amin Fazlali
  • 1,209
  • 1
  • 9
  • 17

1 Answers1

0

There is a Dynamic boosting method suggested here

What they do is two have 2 (or more) queries, and boost them differently, e.g.

{
  "query": {
    "bool": {
      "should": [
        {
          "match": {
            "MyFieldName": {
              "query": "nuclear bomb",
              "boost": 8
            }
          }
        },
        {
          "match": { 
            "content": "other query terms there"
          }
        }
      ]
    }
  }
}
Hooman Bahreini
  • 14,480
  • 11
  • 70
  • 137