# Problem boost when search using all field

**URL:** <https://discuss.elastic.co/t/problem-boost-when-search-using-all-field/5395>\
**Category:** Elasticsearch\
**Created:** [September 16, 2011, 5:08pm UTC](https://discuss.elastic.co/t/problem-boost-when-search-using-all-field/5395 "2011-09-16T17:08:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Maia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gustavo_maia/32/2183_2.png) [@Gustavo\_Maia](https://discuss.elastic.co/u/Gustavo_Maia)\
**Post date:** [September 16, 2011, 5:08pm UTC](https://discuss.elastic.co/t/problem-boost-when-search-using-all-field/5395/1 "2011-09-16T17:08:01Z")

</div>

I am having trouble using the search field \_all. The search field appears  
that all is not using the boost set in each field.  
The following example from my bottom configuration and searches.

{  
"topicoindex" : {  
"topicoindexmap" : {  
"\_boost" : {  
"null\_value" : 1.0,  
"name" : "doc\_boost"  
},  
"\_source" : {  
"enabled" : false  
},  
"properties" : {  
"id" : {  
"store" : "yes",  
"type" : "long"  
},  
"topico" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"titulo" : {  
"index" : "no",  
"store" : "yes",  
"boost" : 2.0,  
"type" : "string"  
},  
"tipo" : {  
"store" : "yes",  
"type" : "integer"  
},  
"primeiro\_term" : {  
"store" : "yes",  
"boost" : 1000.0,  
"type" : "string"  
},  
}  
}  
}  
}

Example search 1: use 2 fields (titulo boost(2.0f) and primeiro\_term  
boost(1000.0))

{  
"from" : 0,  
"size" : 200,  
"query" : {  
"query\_string" : {  
"query" : "Habeas",  
"fields" : ["titulo", "primeiro\_term"],  
"default\_operator" : "and",  
"enable\_position\_increments" : false  
}  
},  
"fields" : ["topico", "primeiro\_term"]  
}

Result List and score:

HABEAS CORPUS | 2540.5815  
HABEAS-C0RPUS | 2412.527

Example search 2: use field \_ALL

{  
"from" : 0,  
"size" : 200,  
"query" : {  
"query\_string" : {  
"query" : "Habeas",  
"fields" : ["\_all"],  
"default\_operator" : "and",  
"enable\_position\_increments" : false  
}  
},  
"fields" : ["topico", "primeiro\_term"]  
}

Result List and score:

HABEAS CORPUS | 0.67507887  
HABEAS-C0RPUS | 0.6746672

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Problem-boost-when-search-using-all-field-tp3342538p3342538.html](http://elasticsearch-users.115913.n3.nabble.com/Problem-boost-when-search-using-all-field-tp3342538p3342538.html)  
Sent from the ElasticSearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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:54am UTC](https://discuss.elastic.co/t/problem-boost-when-search-using-all-field/5395/2 "2017-07-06T03:54:18Z")

</div>


