# Disable norming for a dynamic filed

**URL:** <https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889>\
**Category:** Elasticsearch\
**Created:** [March 5, 2012, 9:50am UTC](https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889 "2012-03-05T09:50:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lep/32/2961_2.png) [@lep](https://discuss.elastic.co/u/lep)\
**Post date:** [March 5, 2012, 9:50am UTC](https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889/1 "2012-03-05T09:50:36Z")

</div>

Hi,

what is the best way to disable norming for a dynamic object with put  
mapping command  
i was able to disable it for a specific filed name  
"f1": {  
"type": "string",  
"store": "yes",  
"index": "not\_analyzed",  
"omit\_term\_freq\_and\_positions" : true,  
"omit\_norms" : true,  
"boost" : 1.0,  
"term\_vector" : "no"  
}

but did not able to do it for a dynamic object

Thanks  
-Lep

---

<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 5, 2012, 3:27pm UTC](https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889/2 "2012-03-05T15:27:45Z")

</div>

Check dynamic templates here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/root-object-type.html). Specifically, if you are looking to disable norms for string types under a specific object, see path\_match.

On Monday, March 5, 2012 at 11:50 AM, lep wrote:

> Hi,
> 
> what is the best way to disable norming for a dynamic object with put  
> mapping command  
> i was able to disable it for a specific filed name  
> "f1": {  
> "type": "string",  
> "store": "yes",  
> "index": "not\_analyzed",  
> "omit\_term\_freq\_and\_positions" : true,  
> "omit\_norms" : true,  
> "boost" : 1.0,  
> "term\_vector" : "no"  
> }
> 
> but did not able to do it for a dynamic object
> 
> Thanks  
> -Lep

---

<div class="post-metadata">

**Author:** ![lep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lep/32/2961_2.png) [@lep](https://discuss.elastic.co/u/lep)\
**Post date:** [March 11, 2012, 2:36pm UTC](https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889/3 "2012-03-11T14:36:50Z")

</div>

Hi Shay,

I need to set a mapping in elasticsearch that include f1 a static  
filed and change the default behaviour of es and also to have a  
dynamic filed named object that has dynamic fields under it ( all the  
fields need to "omit\_norms" : true).

I have added my mapping ,I am still getting my object.f1 with norming  
is my mapping is a valid mapping to get this type of behaviour.

Please Advice.

{  
"data": {  
"properties": {  
"f1": {  
"type": "string",  
"store": "yes",  
"index": "not\_analyzed",  
"omit\_term\_freq\_and\_positions" : true,  
"omit\_norms" : true,  
"boost" : 1.0,  
"term\_vector" : "no"  
},  
"obj" : {  
type : "object",  
"dynamic\_templates" : [  
{  
"generic\_obj" : {

"match" : "\*",

"mapping" : {  
"omit\_norms" : true  
}  
}  
}  
]  
}

```
    }
}

```

}

On Mar 5, 5:27 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Check dynamic templates here:[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/root-object-type).... Specifically, if you are looking to disable norms for string types under a specific object, see path\_match.
> 
> On Monday, March 5, 2012 at 11:50 AM, lep wrote:
> 
> > Hi,
> 
> > what is the best way to disable norming for a dynamic object with put  
> > mapping command  
> > i was able to disable it for a specific filed name  
> > "f1": {  
> > "type": "string",  
> > "store": "yes",  
> > "index": "not\_analyzed",  
> > "omit\_term\_freq\_and\_positions" : true,  
> > "omit\_norms" : true,  
> > "boost" : 1.0,  
> > "term\_vector" : "no"  
> > }
> 
> > but did not able to do it for a dynamic object
> 
> > Thanks  
> > -Lep

---

<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 14, 2012, 12:02pm UTC](https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889/4 "2012-03-14T12:02:10Z")

</div>

Your format is not correct, dynamic\_templates need to be under the root type, see samples here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/root-object-type.html).

On Sunday, March 11, 2012 at 4:36 PM, lep wrote:

> {  
> "data": {  
> "properties": {  
> "f1": {  
> "type": "string",  
> "store": "yes",  
> "index": "not\_analyzed",  
> "omit\_term\_freq\_and\_positions" : true,  
> "omit\_norms" : true,  
> "boost" : 1.0,  
> "term\_vector" : "no"  
> },  
> "obj" : {  
> type : "object",  
> "dynamic\_templates" : [  
> {  
> "generic\_obj" : {
> 
> "match" : "\*",
> 
> "mapping" : {  
> "omit\_norms" : true  
> }  
> }  
> }  
> ]  
> }
> 
> }  
> }  
> }

---

<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:36am UTC](https://discuss.elastic.co/t/disable-norming-for-a-dynamic-filed/6889/5 "2017-07-06T03:36:15Z")

</div>


