Hello @warkolm
when i use this
curl -X PUT "http://${ES_HOST}:${ES_PORT}/$newindex?pretty"
it creates the new index
but when I try to reindex with old it shows success but the values are not correct which means it doenst reindex
green open old_03 ETKrTJIoRTGdrmxY6lx4nQ 5 1 56220 0 65.8mb 65.8mb
yellow open old_03-new WdNqv-k3Qfi0cklKqQtrBA 5 1 0 0 1.1kb 1.1kb
but when I
**curl -GET http://localhost:9200/old_index/_mapping?pretty**
and use the same value to create new index it creates new index and even reindex is working
this is how I am creating new index with mapping value from old index
curl -X PUT \
http://localhost:9200/old_to_new \
-H 'Content-Type: application/json' \
-d '{"mappings" : {
"message" : {
"dynamic_templates" : [
{
"internal_fields" : {
"match" : "gl2_*",
"match_mapping_type" : "string",
"mapping" : {
"type" : "keyword"
}
}
},
{
"store_generic" : {
"match_mapping_type" : "string",
"mapping" : {
"type" : "keyword"
}
}
}
],
"properties" : {
"LoggerName" : {
"type" : "keyword"
},
"MessageParam0" : {
"type" : "keyword"
},
"MessageParam1" : {
"type" : "long"
},
"MessageParam2" : {
"type" : "keyword"
},
"MessageParam3" : {
"type" : "keyword"
},
"MessageParam4" : {
"type" : "keyword"
},
"MessageParam5" : {
"type" : "keyword"
},
"MessageParam6" : {
"type" : "keyword"
},
"MessageParam7" : {
"type" : "keyword"
},
"MessageParam8" : {
"type" : "keyword"
},
"Severity" : {
"type" : "keyword"
},
"SourceClassName" : {
"type" : "keyword"
},
"SourceMethodName" : {
"type" : "keyword"
},
"SourceSimpleClassName" : {
"type" : "keyword"
},
"StackTrace" : {
"type" : "keyword"
},
"Thread" : {
"type" : "keyword"
},
"Time" : {
"type" : "keyword"
},
"facility" : {
"type" : "keyword"
},
"full_message" : {
"type" : "text",
"analyzer" : "standard"
},
"gl2_accounted_message_size" : {
"type" : "long"
},
"gl2_message_id" : {
"type" : "keyword"
},
"gl2_processing_timestamp" : {
"type" : "date",
"format" : "yyyy-MM-dd HH:mm:ss.SSS"
},
"gl2_receive_timestamp" : {
"type" : "date",
"format" : "yyyy-MM-dd HH:mm:ss.SSS"
},
"gl2_remote_ip" : {
"type" : "keyword"
},
"gl2_remote_port" : {
"type" : "long"
},
"gl2_source_input" : {
"type" : "keyword"
},
"gl2_source_node" : {
"type" : "keyword"
},
"level" : {
"type" : "long"
},
"message" : {
"type" : "text",
"analyzer" : "standard"
},
"source" : {
"type" : "text",
"analyzer" : "analyzer_keyword",
"fielddata" : true
},
"streams" : {
"type" : "keyword"
},
"timestamp" : {
"type" : "date",
"format" : "yyyy-MM-dd HH:mm:ss.SSS"
}
}
}
}
}
}'
can you please guide what I am doing wrong in reindexing part,
curl -X POST \
http://localhost:9200/_reindex \
-H 'Content-Type: application/json' \
-d '{
"source": {
"index": "old_0"
},
"dest": {
"index": "old_to_new"
}
}'
Regards,
Sameer