# Boost a particular es type

**URL:** <https://discuss.elastic.co/t/boost-a-particular-es-type/14041>\
**Category:** Elasticsearch\
**Created:** [October 21, 2013, 3:23pm UTC](https://discuss.elastic.co/t/boost-a-particular-es-type/14041 "2013-10-21T15:23:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Kumar\_Peruma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_kumar_peruma/32/1838_2.png) [@Krishna\_Kumar\_Peruma](https://discuss.elastic.co/u/Krishna_Kumar_Peruma)\
**Post date:** [October 21, 2013, 3:23pm UTC](https://discuss.elastic.co/t/boost-a-particular-es-type/14041/1 "2013-10-21T15:23:48Z")

</div>

query on "com" and "att" elasticsearch types.

I want to boost based on elasticsearch type. If the type is "com", I'd like  
a boost in the score of results from that type. Is it possible? If yes, how?

Query:  
{  
"query": {  
"bool": {  
"should": [  
{  
"match": {  
"verbose": qString  
}  
},  
{  
"match\_phrase\_prefix": {  
"verbose": {  
"query": qString  
}  
}  
}  
]  
}  
},  
"from": offset,  
"size": count,  
"filter": {  
"terms": {  
"project\_id": project\_ids  
}  
}  
};

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Krishna\_Kumar\_Peruma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_kumar_peruma/32/1838_2.png) [@Krishna\_Kumar\_Peruma](https://discuss.elastic.co/u/Krishna_Kumar_Peruma)\
**Post date:** [October 21, 2013, 3:34pm UTC](https://discuss.elastic.co/t/boost-a-particular-es-type/14041/2 "2013-10-21T15:34:42Z")

</div>

Oops.. Ignore this one!

Got my answer with [gist:1296774 · GitHub](https://gist.github.com/kimchy/1296774)

/Krishna

On Monday, October 21, 2013 8:53:48 PM UTC+5:30, Krishna Kumar Perumalla  
wrote:

> query on "com" and "att" elasticsearch types.
> 
> I want to boost based on elasticsearch type. If the type is "com", I'd  
> like a boost in the score of results from that type. Is it possible? If  
> yes, how?
> 
> Query:  
> {  
> "query": {  
> "bool": {  
> "should": [  
> {  
> "match": {  
> "verbose": qString  
> }  
> },  
> {  
> "match\_phrase\_prefix": {  
> "verbose": {  
> "query": qString  
> }  
> }  
> }  
> ]  
> }  
> },  
> "from": offset,  
> "size": count,  
> "filter": {  
> "terms": {  
> "project\_id": project\_ids  
> }  
> }  
> };

--  
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).  
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, 2:11am UTC](https://discuss.elastic.co/t/boost-a-particular-es-type/14041/3 "2017-07-06T02:11:23Z")

</div>


