Avoid dynamic mapping in elastic search

Normally elastic search is schemaless. So it doesn’t care if a document in an index has a different structure is inserted. If you want to avoid that and allow only insertion of documents that fit the schema you have defined when creating the index just add mapper -> dynamic -> false in your put request when creating the index.

But that does prevent you from inserting unknown types but you are still able to add known types without given properties or with complete other properties.

GD Star Rating
loading...

Kommentar verfassen