# Help with Boosting Query

**URL:** <https://discuss.elastic.co/t/help-with-boosting-query/81191>\
**Category:** Elasticsearch\
**Created:** [April 4, 2017, 5:42pm UTC](https://discuss.elastic.co/t/help-with-boosting-query/81191 "2017-04-04T17:42:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Lopez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ivan_lopez/32/17064_2.png) [@Ivan\_Lopez](https://discuss.elastic.co/u/Ivan_Lopez)\
**Post date:** [April 4, 2017, 5:42pm UTC](https://discuss.elastic.co/t/help-with-boosting-query/81191/1 "2017-04-04T17:42:49Z")

</div>

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](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
                    }
                 }
              ]
           }
        }
     }
  }
}
```

---

<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:** [May 2, 2017, 5:42pm UTC](https://discuss.elastic.co/t/help-with-boosting-query/81191/2 "2017-05-02T17:42:55Z")

</div>

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