# Boosting in es

**URL:** <https://discuss.elastic.co/t/boosting-in-es/15583>\
**Category:** Elasticsearch\
**Created:** [February 4, 2014, 8:43am UTC](https://discuss.elastic.co/t/boosting-in-es/15583 "2014-02-04T08:43:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Post date:** [February 4, 2014, 8:43am UTC](https://discuss.elastic.co/t/boosting-in-es/15583/1 "2014-02-04T08:43:16Z")

</div>

I am trying to do the follwing query but it is showing error

{  
"query": {  
"boosting": {  
"positive": {  
"term": {  
"name": "kamal"  
}  
},  
"negative": {  
"term": {  
"email": "abc"  
}  
}  
}  
}  
}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/764af94e-0ff3-4993-a0ec-df0b02444619%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/764af94e-0ff3-4993-a0ec-df0b02444619%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jsbonline2006](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jsbonline2006](https://discuss.elastic.co/u/jsbonline2006)\
**Post date:** [February 4, 2014, 8:54am UTC](https://discuss.elastic.co/t/boosting-in-es/15583/2 "2014-02-04T08:54:39Z")

</div>

Hi Navneet,

What error you are getting while running above command?

Try following Query:  
curl -XPOST "localhost:9200/indexName/indexType/\_search?pretty=true" -d '  
{  
"query" : {  
"boosting" : {  
"positive" : {  
"term" : {  
"name" : "kamal"  
}  
},  
"negative" : {  
"term" : {  
"email" : "abc"  
}  
},  
"negative\_boost" : 0.5  
}  
}  
}

* * *

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/111428e1-cd83-4dc9-8614-09be7d03bcbf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/111428e1-cd83-4dc9-8614-09be7d03bcbf%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Post date:** [February 4, 2014, 9:13am UTC](https://discuss.elastic.co/t/boosting-in-es/15583/3 "2014-02-04T09:13:45Z")

</div>

if I am running the above command it is showing SearchPhaseExecutionException  
error ... but the command you have suggested working fine.  
Thanks.

On Tuesday, 4 February 2014 14:24:39 UTC+5:30, Jayesh Bhoyar wrote:

> Hi Navneet,
> 
> What error you are getting while running above command?
> 
> Try following Query:  
> curl -XPOST "localhost:9200/indexName/indexType/\_search?pretty=true" -d '  
> {  
> "query" : {  
> "boosting" : {  
> "positive" : {  
> "term" : {  
> "name" : "kamal"  
> }  
> },  
> "negative" : {  
> "term" : {  
> "email" : "abc"  
> }  
> },  
> "negative\_boost" : 0.5  
> }  
> }  
> }
> 
> * * *

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/429f456d-787c-4e28-b70f-e45022d308c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/429f456d-787c-4e28-b70f-e45022d308c3%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 1:52am UTC](https://discuss.elastic.co/t/boosting-in-es/15583/4 "2017-07-06T01:52:53Z")

</div>


