Unable to disable dynamic mapping


(ronsher) #1

I'm using version 1.7.4

We've set index.mapper.dynamic: false in the elasticsearch.yml

I've noticed that new fields are automatically created (and added to the mapping) even though they are not part of the original mapping we provided.

I was under the impression that dynamic:false ignores fields that are not defined (as opposed to strict that also throws an exception).

Am I missing something?


(Chris Harmon) #2

Try adding "dynamic":"false" to your mapping:

{
	"MyDocument":{
		"dynamic":"false",
		"properties":{
			...
		}
	}
}

(ronsher) #3

Isn't putting index.mapper.dynamic: false in the elasticsearch.yml file a valid configuration?
Does elasticsearch ignore that?


(Anh) #4

I think your index mapping may overwrite the settings in elasticsearch.yml.


(ronsher) #5

But I wanted the default to block dynamic mappings


(Anh) #6

Can you post your current mapping templates?


(Chris Harmon) #7

Sounds like this was a known bug & possibly fixed in December, though I'm not sure how to tell in which version (I'm still rather new to git).


(Jason Tedor) #8

It will be fixed in version 2.3.0 of Elasticsearch.


(system) #9