-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapper_parsing_exception - failed to parse #579
Comments
Once a mapping is created it cannot be changed so dynamic mapping won't help you here You have to specify the mappings manually or use index templates to define them implicitly for a set of indices. Hope this helps, |
But the problem I have is I can't specify the mapping while an index gets created. That is because the content is a dynamic JSON whose fields are not predefined. Kindly suggest me an approach where in I am able to allow dynamic mapping and whenever the data type of a field changes the elastic considers the latest datatype |
Elasticsearch cannot change a datatype of an existing field, due to its nature it is impossible. If you need to control the mappings of newly created indices, without creating them explicitly before indexing, please have a look at index templates - https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html |
Ok I get that. But how do I clean up the existing conflicts that have already occured ? |
You have to delete the indices and create new ones with proper mappings. |
Ok Thank you Honza |
I know this happening because there is a field whose data type is different from the actual kind of data that is coming. But I have used dynamic mapping wherein I don't specify the mapping and allow the elastic to map itself. The problem that I am facing is, few days back a field called create_date was of date type but now since I do a Json.dump it has become of type string and there is a conflict because of this.
Every day a new index gets created and corresponding new mapping has to get created for it. Then why does this conflict happen? can't we have different mappings for different indices? and how can i resolve this conflict and make sure that the elastic picks up the current datatype and ignores the conflicts
The text was updated successfully, but these errors were encountered: