# Boosting in two-parts boolean query?

**URL:** <https://discuss.elastic.co/t/boosting-in-two-parts-boolean-query/8121>\
**Category:** Elasticsearch\
**Created:** [June 15, 2012, 3:22pm UTC](https://discuss.elastic.co/t/boosting-in-two-parts-boolean-query/8121 "2012-06-15T15:22:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Sviridov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexander_sviridov/32/31375_2.png) [@Alexander\_Sviridov](https://discuss.elastic.co/u/Alexander_Sviridov)\
**Post date:** [June 15, 2012, 3:22pm UTC](https://discuss.elastic.co/t/boosting-in-two-parts-boolean-query/8121/1 "2012-06-15T15:22:56Z")

</div>

Hi!  
I'm building a boolean query consisting of two parts joined with  
"should": text\_phrase\_prefix (for the street name) and term (for the  
house number).

How can I boost first part to give higher score to hits with right  
street name?

I've tried adding high "boost" in text\_phrase\_prefix, adding low boost  
in terms, wrapping them in custom\_boost\_factor query... no effect at  
all ☹

Score remains nearly the same for all hits.  
What could I did wrong?

Thank you!

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 15, 2012, 6:18pm UTC](https://discuss.elastic.co/t/boosting-in-two-parts-boolean-query/8121/2 "2012-06-15T18:18:13Z")

</div>

Could you post an example of a query that didn't work for you?

On Friday, June 15, 2012 11:22:56 AM UTC-4, Alexander Sviridov wrote:

> Hi!  
> I'm building a boolean query consisting of two parts joined with  
> "should": text\_phrase\_prefix (for the street name) and term (for the  
> house number).
> 
> How can I boost first part to give higher score to hits with right  
> street name?
> 
> I've tried adding high "boost" in text\_phrase\_prefix, adding low boost  
> in terms, wrapping them in custom\_boost\_factor query... no effect at  
> all ☹
> 
> Score remains nearly the same for all hits.  
> What could I did wrong?
> 
> Thank you!

---

<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, 3:23am UTC](https://discuss.elastic.co/t/boosting-in-two-parts-boolean-query/8121/3 "2017-07-06T03:23:49Z")

</div>


