# Omit\_norms on \_all field

**URL:** <https://discuss.elastic.co/t/omit-norms-on--all-field/8828>\
**Category:** Elasticsearch\
**Created:** [August 23, 2012, 1:25pm UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828 "2012-08-23T13:25:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilshan/32/2364_2.png) [@dilshan](https://discuss.elastic.co/u/dilshan)\
**Post date:** [August 23, 2012, 1:25pm UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/1 "2012-08-23T13:25:40Z")

</div>

Hi,

It seems like when I set "omit\_norms : true" on a field, it affects the  
results only when I search on that field directly. It doesn't work when I  
search on \_all field.  
Also, after setting "omit\_norms : true" on a field, it doesn't allow me to  
change the setting back to false through the update mapping API.  
Can somebody please explain me whether this is the intended behavior of  
omit\_norms and why it is working as that?  
Please see below for the curl recreation of this.

> <https://gist.github.com/dilshancalcey/3436362>

In the recreation, when searched on 'name' field it returns identical  
scores. But when searched on '\_all' field scores are different.  
Also, 'omit\_norms' value doesn't change after changing the mapping.

thanks,  
Dilshan.

--

---

<div class="post-metadata">

**Author:** ![dilshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilshan/32/2364_2.png) [@dilshan](https://discuss.elastic.co/u/dilshan)\
**Post date:** [August 26, 2012, 11:46am UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/2 "2012-08-26T11:46:17Z")

</div>

Hi,

can somebody please help me with this?

thanks.

--

---

<div class="post-metadata">

**Author:** ![dilshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilshan/32/2364_2.png) [@dilshan](https://discuss.elastic.co/u/dilshan)\
**Post date:** [October 10, 2012, 10:40pm UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/3 "2012-10-10T22:40:55Z")

</div>

Any ideas on this?

thanks.

--

---

<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:** [October 11, 2012, 7:43am UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/4 "2012-10-11T07:43:51Z")

</div>

Hiya

> It seems like when I set "omit\_norms : true" on a field, it affects  
> the results only when I search on that field directly. It doesn't work  
> when I search on \_all field.

Correct. The \_all field is a completely separate field, with its own  
settings and analysis process.

The values (not tokens!) from all fields are passed to the \_all field,  
which then analyses them using (by default) the standard analyser.

So what you are seeing is expected

clint

--

---

<div class="post-metadata">

**Author:** ![dilshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilshan/32/2364_2.png) [@dilshan](https://discuss.elastic.co/u/dilshan)\
**Post date:** [October 18, 2012, 4:34am UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/5 "2012-10-18T04:34:37Z")

</div>

Hi,

Thanks for the reply.  
I guess I got why it doesn't work on \_all field.  
Any idea why we can't set the omit\_norms field back to false through update  
mapping API ?

thanks.

--

---

<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:** [October 18, 2012, 7:38am UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/6 "2012-10-18T07:38:51Z")

</div>

Hiya

> Thanks for the reply.  
> I guess I got why it doesn't work on \_all field.  
> Any idea why we can't set the omit\_norms field back to false through  
> update mapping API ?

You can't make changes to existing fields with update mapping, only add  
new fields (or new multi\_fields), as your existing data would be  
incorrect,

For that you need reindex your data.

But why not just query the original field(s) instead of the \_all field?

clint

> thanks.
> 
> --

--

---

<div class="post-metadata">

**Author:** ![dilshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilshan/32/2364_2.png) [@dilshan](https://discuss.elastic.co/u/dilshan)\
**Post date:** [October 22, 2012, 6:33am UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/7 "2012-10-22T06:33:28Z")

</div>

On Thursday, October 18, 2012 1:09:10 PM UTC+5:30, Clinton Gormley wrote:

> Hiya
> 
> > Thanks for the reply.  
> > I guess I got why it doesn't work on \_all field.  
> > Any idea why we can't set the omit\_norms field back to false through  
> > update mapping API ?
> 
> You can't make changes to existing fields with update mapping, only add  
> new fields (or new multi\_fields), as your existing data would be  
> incorrect,
> 
> For that you need reindex your data.
> 
> But why not just query the original field(s) instead of the \_all field?
> 
> clint

There are about 20 boosted fields we are indexing and we observe that  
querying on \_all field gives us much better performance compared to  
querying separately on each field.  
Basically, what we are trying to achieve is to avoid the impact of document  
size when calculating ES score.  
Thought omit\_norms is the solution here but it seems I cannot get it to  
work, first because it doesn't work on \_all field and second I cannot set  
it in a boosted field.  
Any idea on avoiding impact of document size when calculating ES score in  
such a case?

Thanks.

--

---

<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:07am UTC](https://discuss.elastic.co/t/omit-norms-on--all-field/8828/8 "2017-07-06T03:07:40Z")

</div>


