# \[custom\_filters\_score\] query does not support \[max\_boost\]

**URL:** https://discuss.elastic.co/t/custom-filters-score-query-does-not-support-max-boost/9813
**Category:** Elasticsearch
**Created:** [November 24, 2012, 7:41pm UTC](https://discuss.elastic.co/t/custom-filters-score-query-does-not-support-max-boost/9813 "2012-11-24T19:41:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Weitzenfeld](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_weitzenfeld/32/2593_2.png) [@Daniel\_Weitzenfeld](https://discuss.elastic.co/u/Daniel_Weitzenfeld)
#### Post date: [November 24, 2012, 7:41pm UTC](https://discuss.elastic.co/t/custom-filters-score-query-does-not-support-max-boost/9813/1 "2012-11-24T19:41:19Z")

</div>

I'm using elasticsearch-0.19.0, and I'm getting an error trying to use  
max\_boost with custom\_filters\_score,  
as per the documentation:  
[http://www.elasticsearch.org/guide/reference/query-dsl/custom-filters-score-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/custom-filters-score-query.html)

Here is my query object. I have max\_boost at the same level as score\_mode,  
and I'm confused as to where else it could go, or if I'm doing something  
else wrong.  
Thanks in advance!

{  
"query":{  
"custom\_filters\_score":{  
"query":{  
"term":{  
"go":"sf"  
}  
},  
"score\_mode":"total",  
"max\_boost":50,  
"params":{  
"param3":29,  
"param2":-1,  
"param1":-1  
},  
"filters":[  
{  
"filter":{  
"terms":{  
"names":[  
"Joe",  
"Bill"  
]  
}  
},  
"boost":2  
},  
{  
"filter":{  
"numeric\_range":{  
"age":{  
"to":40,  
"from":25  
}  
}  
},  
"script":  
"doc['age'].value\>param3 ? pow(doc['age'].value-param3,2)\*param1 : pow(doc['age'].value-param3,2)\*param2"  
}  
]  
}  
}  
}

--

---

<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: [November 25, 2012, 12:54am UTC](https://discuss.elastic.co/t/custom-filters-score-query-does-not-support-max-boost/9813/2 "2012-11-25T00:54:00Z")

</div>

That looks correct. What error are you getting?

On Saturday, November 24, 2012 2:41:19 PM UTC-5, Daniel Weitzenfeld wrote:

> I'm using elasticsearch-0.19.0, and I'm getting an error trying to use  
> max\_boost with custom\_filters\_score,  
> as per the documentation:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/custom-filters-score-query.html)
> 
> Here is my query object. I have max\_boost at the same level as  
> score\_mode,  
> and I'm confused as to where else it could go, or if I'm doing something  
> else wrong.  
> Thanks in advance!
> 
> {  
> "query":{  
> "custom\_filters\_score":{  
> "query":{  
> "term":{  
> "go":"sf"  
> }  
> },  
> "score\_mode":"total",  
> "max\_boost":50,  
> "params":{  
> "param3":29,  
> "param2":-1,  
> "param1":-1  
> },  
> "filters":[  
> {  
> "filter":{  
> "terms":{  
> "names":[  
> "Joe",  
> "Bill"  
> ]  
> }  
> },  
> "boost":2  
> },  
> {  
> "filter":{  
> "numeric\_range":{  
> "age":{  
> "to":40,  
> "from":25  
> }  
> }  
> },  
> "script":  
> "doc['age'].value\>param3 ? pow(doc['age'].value-param3,2)\*param1 : pow(doc['age'].value-param3,2)\*param2"  
> }  
> ]  
> }  
> }  
> }

--

---

<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:03am UTC](https://discuss.elastic.co/t/custom-filters-score-query-does-not-support-max-boost/9813/3 "2017-07-06T03:03:01Z")

</div>


