Hi all and sorry for my poor english.
I've successfully mapped a field as date (for kibana purpose) before ingestioning one document ,using this:
PUT my-index
{
"mappings": {
"properties": {
"currentDate": {
"type": "date" ,
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
I wonder how can I do that when a document is already ingestioned.
You can't change a mapping once you have indexed some documents using it. You can only add to the mapping with new fields. But you do have 2 options and the 2nd one is probably the easiest as long as you can ingest that document again easily.
Option 1
- Create mapping you want
-
Reindex into new index using new mapping
- Delete old index
- Reindex back to original index name
Option 2
- Delete your current index
- Reingest your data with new mapping
Why do you not plan to enable a mapping runtime on indexed document (if mapping is compliant )?
This is could be a good enhancement.
Thanks for your response!