# Dis\_max and boost

**URL:** <https://discuss.elastic.co/t/dis-max-and-boost/18754>\
**Category:** Elasticsearch\
**Created:** [July 21, 2014, 2:56am UTC](https://discuss.elastic.co/t/dis-max-and-boost/18754 "2014-07-21T02:56:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Kotlyarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexey_kotlyarov/32/1386_2.png) [@Alexey\_Kotlyarov](https://discuss.elastic.co/u/Alexey_Kotlyarov)\
**Post date:** [July 21, 2014, 2:56am UTC](https://discuss.elastic.co/t/dis-max-and-boost/18754/1 "2014-07-21T02:56:57Z")

</div>

I am confused about the way boosting works inside a dis\_max query.

I have documents to search with two fields - "name" and "important".  
Anything that matches within "important" must come before anything in  
"name". The query I have is a dis\_max of:

"match": { "name": { "query": "zzz", "fuzziness": "AUTO" }}  
"match": { "important": { "query": "zzz", "fuzziness": "AUTO", "boost":  
100 }}

The two test documents are: { "name": "zzz" } and { "important": "zzz" }.

They are scored _the same_ on the above dis\_max, and the explanation  
doesn't mention the boost at all.

However, if I remove fuzziness from the "important" query:

"match": { "important": { "query": "zzz", "boost": 100 }}

Then the "important" document scores better, as it (in my intent) should.

How does boosting work inside a dis\_max query?

How do I correctly boost the "important" field inside a dis\_max?

Attached is the cURL reproduction of the problem.

--  
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/4ce0807c-b9f3-48d7-84e8-f664c7de4552%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4ce0807c-b9f3-48d7-84e8-f664c7de4552%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:14am UTC](https://discuss.elastic.co/t/dis-max-and-boost/18754/2 "2017-07-06T01:14:39Z")

</div>


