ElasticSearch - Reindex to add doc_value -


what trying do?

add doc_type existing index.

what have tried?

created index , document

post /my_index-1/my_type/1 {     "my_prop": "my_value" } 

added template

put /_template/my_template {     "id": "my_template",     "template": "my_index-*",     "mappings": {         "_default_": {             "dynamic_templates": [                 {                     "my_prop_template": {                         "mapping": {                             "index": "not_analyzed",                             "doc_values": true,                             "fielddata": {                                 "format": "doc_values"                             },                             "type": "string"                         },                         "match": "my_prop",                         "match_mapping_type": "string"                     }                 }             ]         }     } } 

reindexed

./stream2es es --source http://localhost:9200/my_index-1 --target http://localhost:9200/my_index-2 

what went wrong?

in new index my_index-2 property did not receive "doc_values": true:

... "properties": {     "my_prop": {         "type": "string"     } } ... 
  • just sanity, have tried adding same document my_index-3, , got "doc_values": true.

my question

how can reindex old index "doc_values": true?

thanks @val! logstash indeed solved problem.

both stream2es , elasticsearch-reindex created new mapping without "doc_values": true.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -