# Why can't I assign a boost to integer types in my mapping?

**URL:** https://discuss.elastic.co/t/why-cant-i-assign-a-boost-to-integer-types-in-my-mapping/10675
**Category:** Elasticsearch
**Created:** [February 8, 2013, 11:38pm UTC](https://discuss.elastic.co/t/why-cant-i-assign-a-boost-to-integer-types-in-my-mapping/10675 "2013-02-08T23:38:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tbrianjones](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbrianjones/32/1402_2.png) [@tbrianjones](https://discuss.elastic.co/u/tbrianjones)
#### Post date: [February 8, 2013, 11:38pm UTC](https://discuss.elastic.co/t/why-cant-i-assign-a-boost-to-integer-types-in-my-mapping/10675/1 "2013-02-08T23:38:10Z")

</div>

Every time I try to assign a boost to an integer I get the following error  
message:

{"error":"UnsupportedOperationException[You cannot set an index-time boost:  
norms are omitted for field 'field\_name']","status":500}

Here is my mapping for that field:

"field\_name" : { "type" : "integer", "index" : "not\_analyzed",  
"include\_in\_all" : true, "boost" : 10 }

This fails with other number types as well. Boosting works fine on string  
types.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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: [February 9, 2013, 3:00pm UTC](https://discuss.elastic.co/t/why-cant-i-assign-a-boost-to-integer-types-in-my-mapping/10675/2 "2013-02-09T15:00:41Z")

</div>

> {"error":"UnsupportedOperationException[You cannot set an index-time  
> boost: norms are omitted for field 'field\_name']","status":500}

Norms are not stored for numeric fields, and index time boost is stored  
in the "norms".

This is a good thing - norms add a lot to index size. Boost is easy to  
apply at search time and gives you more flexibility:

{ match: { field\_name: { query: 5, boost: 10 }}}

clint

--  
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).  
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, 2:52am UTC](https://discuss.elastic.co/t/why-cant-i-assign-a-boost-to-integer-types-in-my-mapping/10675/3 "2017-07-06T02:52:16Z")

</div>


