The Elasticsearch cluster can contain several indexes (databases), which, in turn, contain several types (tables). Is it possible to set a mapping for an index in an index for all types?
Use the _default_ display option in the index. When the type is created, it will have the field mapping you are looking for.
PUT /my_index{ "mappings": { "_default_": { "properties": { "field1": { "type": "string", "index": "analyzed" } } } }
You can also use the Index Template if you want all new indexes to have this default setting. I think it would be nice to improve dynamic templates at the index level so that they can be applied to different types. Now it is impossible.
Perhaps you could use the Multiple PUT Request Index: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-put-mapping.html#put-mapping-multi-index
Source: https://habr.com/ru/post/1208272/More articles:Why does the bonded installation recompile what was built? - haskellPerl Module for Elastisearch Percolator - perlGet the root QML object from anywhere in the code in Qt 5.3 - qtHow to reboot or turn off the Genymotion device? - androidExport dynamic column count to ActiveAdmin CSV - ruby-on-railsHow to handle err_blocked_by_client using javascript? - javascriptWhat is the difference between using JDK 7 and JDK 8 with 1.7 compiler compliance level? - javaHow can I use the elastic subproblem in PuLP as a limitation? - pythoncreate message pool and path on static google maps - google-mapsTell the iterator of strict type objects in PHPDoc - phpAll Articles