elasticsearch - Create multi field in elastic search -
i want create index , here mapping.i want create multi field on field - 'findings' 1 default mapping(analzyed) , other 1 'orig'(not_analyzed).
put nto { "mappings": { "_default_": { "properties": { "date": { "type": "string", "index": "not_analyzed" }, "bo": { "type": "string", "index": "not_analyzed" }, "pg": { "type": "string" }, "rate": { "type": "float" }, "findings": { "type": "multi_field", "fields": { "findings": { "type": "string", "index": "analyzed" }, "orig": { "type": "string", "index":"not_analyzed" } } } } } } }
once create mapping don't see orig field being created. here mapping see,
{ "ccdn": { "aliases": {}, "mappings": { "test": { "properties": { "bo": { "type": "string", "index": "not_analyzed" }, "date": { "type": "string", "index": "not_analyzed" }, "findings": { "type": "string", "fields": { "orig": { "type": "string", "index": "not_analyzed" } } }, "pg": { "type": "string" }, "rate": { "type": "float" } } }, "_default_": { "properties": { "bo": { "type": "string", "index": "not_analyzed" }, "date": { "type": "string", "index": "not_analyzed" }, "findings": { "type": "string", "fields": { "orig": { "type": "string", "index": "not_analyzed" } } }, "pg": { "type": "string" }, "rate": { "type": "float" } } } }, "settings": { "index": { "creation_date": "1454893575663", "uuid": "wjndgz1asvsfjtidywsrpg", "number_of_replicas": "1", "number_of_shards": "5", "version": { "created": "2020099" } } }, "warmers": {} } }
i don't see default field 'findings' - analyzed being created.
elasticsearch multi field has expired. see here. might need findings
field :
"findings": { "type": "string", "index": "analyzed", "fields": { "orig": { "type": "string", "index": "not_analyzed" } } }
Comments
Post a Comment