# Ignored boosts

**URL:** <https://discuss.elastic.co/t/ignored-boosts/14139>\
**Category:** Elasticsearch\
**Created:** [October 28, 2013, 12:53pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139 "2013-10-28T12:53:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigoal](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rodrigoal](https://discuss.elastic.co/u/rodrigoal)\
**Post date:** [October 28, 2013, 12:53pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139/1 "2013-10-28T12:53:15Z")

</div>

I'm using the custom filters score query but the boosts declared in the "terms" filters are being ignored. The only score that's not ignored is the "script" one in the "exists" filter. I reviewed the documentation many times in order to find the problem but I had no success.  
This is the actual query:

{ 'from': 0, 'query': { 'custom\_filters\_score': { 'filters': [{ 'filter': { 'exists': { 'field': 'tweet\_article\_poster' } }, 'script': "doc['actual\_rank'].value/5000.0 + 1.0" }, { 'boost': '1.3', 'filter': { 'terms': { 'entities.text': ['Google', 'Twitter', 'Obama', 'NFL'] } } }, { 'boost': '1.3', 'filter': { 'terms': { 'category': ['Sports', 'Politics', 'Technology\_Internet'] } } }, { 'boost': '2', 'filter': { 'terms': { 'tweet\_article\_poster': ['JoeGumby1', 'BBCSport', 'EyeOnNFL', 'MadeOfWWEAndHTC'] } } } ], 'query': { 'bool': { 'must': { 'range': { 'added': { 'from': '2013-10-27T00:00:00' } } }, 'must\_not': { 'term': { 'show': 'false' } } } }, 'score\_mode': 'multiply' } }, 'size': 20}

--  
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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 28, 2013, 2:25pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139/2 "2013-10-28T14:25:31Z")

</div>

Filters do not contribute to scoring by definition, and therefore, boosting  
filter terms is meaningless.

Jörg

--  
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:** ![rodrigoal](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rodrigoal](https://discuss.elastic.co/u/rodrigoal)\
**Post date:** [October 28, 2013, 2:30pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139/3 "2013-10-28T14:30:24Z")

</div>

Are you sure?  
From [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-custom-filters-score-query.html:](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-custom-filters-score-query.html:)  
A custom\_filters\_score query allows to execute a query, and if the hit  
matches a provided filter (ordered), use either a boost or a script  
associated with it to compute the score.

Date: Mon, 28 Oct 2013 15:25:31 +0100  
Subject: Re: Ignored boosts  
From: [joergprante@gmail.com](mailto:joergprante@gmail.com)  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)

Filters do not contribute to scoring by definition, and therefore, boosting filter terms is meaningless.  
Jörg

--

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).

--  
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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 28, 2013, 2:38pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139/4 "2013-10-28T14:38:05Z")

</div>

Can you use function score query and see if the issue stil persists?  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html)

Jörg

--  
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:** ![rodrigoal](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rodrigoal](https://discuss.elastic.co/u/rodrigoal)\
**Post date:** [October 28, 2013, 3:00pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139/5 "2013-10-28T15:00:55Z")

</div>

I'm using the 0.90.0 version, the function score was added in 0.90.4 one.

Can you use function score query and see if the issue stil persists? [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html)

Jörg

--  
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:** ![rodrigoal](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rodrigoal](https://discuss.elastic.co/u/rodrigoal)\
**Post date:** [October 28, 2013, 3:22pm UTC](https://discuss.elastic.co/t/ignored-boosts/14139/6 "2013-10-28T15:22:30Z")

</div>

Update: I lowercased the values included in the terms lists and now the boosts are applied to the results.

From: rod0n@live.com.ar  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: RE: Ignored boosts  
Date: Mon, 28 Oct 2013 12:00:55 -0300

I'm using the 0.90.0 version, the function score was added in 0.90.4 one.

Can you use function score query and see if the issue stil persists? [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html)

Jörg

--

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).

--  
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:10am UTC](https://discuss.elastic.co/t/ignored-boosts/14139/7 "2017-07-06T02:10:13Z")

</div>


