# Fields boost

**URL:** <https://discuss.elastic.co/t/fields-boost/15662>\
**Category:** Elasticsearch\
**Created:** [February 7, 2014, 8:29am UTC](https://discuss.elastic.co/t/fields-boost/15662 "2014-02-07T08:29:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Ott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexander_ott/32/105905_2.png) [@Alexander\_Ott](https://discuss.elastic.co/u/Alexander_Ott)\
**Post date:** [February 7, 2014, 8:29am UTC](https://discuss.elastic.co/t/fields-boost/15662/1 "2014-02-07T08:29:13Z")

</div>

Hello,

we are trying to use boost on field level at index time. Therefore we have  
a mapping for e.g. as followed:

{  
"object": {  
"key": "1234",  
"creation\_date": "2014-01-01",  
"title": [  
{  
"maintitle": {  
"\_boost": "5.0",  
"title": "Maintitle"  
}  
},  
{  
"subtitle": {  
"\_boost": "3.0",  
"title": "Subtitle"  
}  
}  
]  
}  
}

Is it correct to name the 'boost' field '\_boost' or must we name it  
'boost'? What is the right convention?

In our query we want to search in '\_all' field and ensure that the boost of  
our fields take effect.  
So will it take effect if we only add the '\_all' field to the query or do  
we have to all the fields with a boost value, too

for e.g.  
"query" : {  
"query\_string" : {  
"query" : "title",  
"fields": ["\_all"]  
}  
}

or like

"query" : {  
"query\_string" : {  
"query" : "title",  
"fields": ["\_all", "object.title.maintitle",  
"object.title.subtitle"]  
}  
}

Greetings,  
Alex

--  
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/aaf76d0d-6775-4879-b68c-cad216fc43bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/aaf76d0d-6775-4879-b68c-cad216fc43bc%40googlegroups.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:** [February 7, 2014, 8:56am UTC](https://discuss.elastic.co/t/fields-boost/15662/2 "2014-02-07T08:56:21Z")

</div>

You can use boost or \_boost, it does not matter.  
The declaration of "fields" in a query has no impact since the boosting is  
applied at indexing time (static boosting). Note, there is also dynamic  
boosting at query time, for boosting query terms.

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFkKOotpsqPP%2BH4MpZ\_qJHF7ZOO7giHGu2p%2BhECFi4ADA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFkKOotpsqPP%2BH4MpZ_qJHF7ZOO7giHGu2p%2BhECFi4ADA%40mail.gmail.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, 1:51am UTC](https://discuss.elastic.co/t/fields-boost/15662/3 "2017-07-06T01:51:52Z")

</div>


