# Boost at index time and search time

**URL:** <https://discuss.elastic.co/t/boost-at-index-time-and-search-time/2846>\
**Category:** Elasticsearch\
**Created:** [March 12, 2010, 1:12pm UTC](https://discuss.elastic.co/t/boost-at-index-time-and-search-time/2846 "2010-03-12T13:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [March 12, 2010, 1:12pm UTC](https://discuss.elastic.co/t/boost-at-index-time-and-search-time/2846/1 "2010-03-12T13:12:25Z")

</div>

Hiya

If I put this mapping:

properties: {  
name: { type: 'string', boost: 2 }, # index\_boost  
text: ï»¿{ type: 'string', boost: 1 }  
}

and then I search for:

curl -XGET '[http://192.168.5.100:9200/\_all/\_search](http://192.168.5.100:9200/_all/_search)' -d '  
{  
"fields" : [],  
"query" : {  
"disMax" : {  
"queries" : [  
{  
"field" : {  
"text" : {  
"boost" : 1,  
"query" : "Smith"  
}  
}  
},  
{  
"field" : {  
"name" : {  
"boost" : 3, # search\_boost  
"query" : "Smith"  
}  
}  
}  
]  
}  
}  
}  
'

Does that mean that the final calculated boost for 'name' is 6  
(ie index\_boost \* search\_boost)?

Or is it 3 (ie search\_boost || index\_boost) ?

thanks

Clint

--  
Web Announcements Limited is a company registered in England and Wales,  
with company number 05608868, with registered address at 10 Arvon Road,  
London, N5 1PR.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 13, 2010, 11:24am UTC](https://discuss.elastic.co/t/boost-at-index-time-and-search-time/2846/2 "2010-03-13T11:24:05Z")

</div>

Its a bit more complex than a simple equation, but you can treat it as  
multiplication.

-shay.banon

On Fri, Mar 12, 2010 at 3:12 PM, Clinton Gormley [clinton@iannounce.co.uk](mailto:clinton@iannounce.co.uk)wrote:

> Hiya
> 
> If I put this mapping:
> 
> properties: {  
> name: { type: 'string', boost: 2 }, # index\_boost  
> text: ﻿{ type: 'string', boost: 1 }  
> }
> 
> and then I search for:
> 
> curl -XGET '[http://192.168.5.100:9200/\_all/\_search](http://192.168.5.100:9200/_all/_search)' -d '  
> {  
> "fields" : ,  
> "query" : {  
> "disMax" : {  
> "queries" : [  
> {  
> "field" : {  
> "text" : {  
> "boost" : 1,  
> "query" : "Smith"  
> }  
> }  
> },  
> {  
> "field" : {  
> "name" : {  
> "boost" : 3, # search\_boost  
> "query" : "Smith"  
> }  
> }  
> }  
> ]  
> }  
> }  
> }  
> '
> 
> Does that mean that the final calculated boost for 'name' is 6  
> (ie index\_boost \* search\_boost)?
> 
> Or is it 3 (ie search\_boost || index\_boost) ?
> 
> thanks
> 
> Clint
> 
> --  
> Web Announcements Limited is a company registered in England and Wales,  
> with company number 05608868, with registered address at 10 Arvon Road,  
> London, N5 1PR.

---

<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, 4:25am UTC](https://discuss.elastic.co/t/boost-at-index-time-and-search-time/2846/3 "2017-07-06T04:25:18Z")

</div>


