Help with Boosting Query

I've been trying to get a boosting query to work and now I don't get any errors but I don't know if I did it right. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-boosting-query.html

Any help would be appreciated.

{  
  "query":{  
     "function_score":{  
        "query":{  
           "bool":{  
              "must":[  
                 {  
                    "boosting":{  
                       "positiasdfadfve":{  
                          "term":{  
                             "post_title":"apple"
                          }
                       },
                       "negative":{  
                          "term":{  
                             "post_title":"oranges"
                          }
                       },
                       "negative_boost":0.2
                    }
                 }
              ],
              "should":[  
                 {  
                    "multi_match":{  
                       "query":"test",
                       "fields":[  
                          "author_name^7",
                          "authors^7",
                          "post_author.login^7",
                          "post_title^5",
                          "terms.post_tag.name^4",
                          "post_content^3",
                          "terms.category.name^2",
                          "post_excerpt^2",
                          "post_meta"
                       ],
                       "type":"phrase",
                       "boost":10
                    }
                 }
              ]
           }
        }
     }
  }
}

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