Mapping conflict 7.1.0

Hello everyone!

Firstly i'd like to thank you all (the community) for your support! You guys helped me solve almost all my problems and I am a little slow! so please bear with me.

I use the basic licence of elastic stack. And pretty much have learnt and understood many things that elastic has to offer!

but I have this issue that I cannot understand! i delete my indexes everyday to re-map my index pattern. I just can't find help for the new version! as _template is obsolete. how do i tell elastic that my field phone.location is type geo_point. (i am sorry! i am really a noob, as i said before i just got this far with all the community support)

I do this everyday and loose data. please help!

{in linux terminal}
step 0) curl -X DELETE "localhost:9200/indexname-*"

{in kibana console}
step 1) POST indexname-*/_flush

step 2) PUT indexname-*/_mapping
{
"properties": {
"phone.location": {
"type": "geo_point",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}

Now it works, for the day! next day new index comes and overwrites my type and (boom!) conflict! when i do not refresh list! (but i am still developing and i do not want to have this with a cron job! the dirty way!) there must be some way. i want to keep the data and understand the new process!

thank you very much in advance! I will really appreciate if you can also explain whats going on (like a step by step guide.) some one like me would also could be there.

  • hank

The right way to apply the right mapping to an index at creation time is to use an index template.

Where did you get this information from? Templates are not obsolete.

Perhaps you are confused that the 5.x syntax was deprecated in #21009 and you should now use index_patterns instead of template when defining the template?

Hi, am sorry for the confusion. My bad.

And thank you for the clarification.
Can you give me an idea on how to implement that? On kibana console or the terminal?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.