# MapperParsingException - need help with dynamic property types

**URL:** <https://discuss.elastic.co/t/mapperparsingexception-need-help-with-dynamic-property-types/18932>\
**Category:** Elasticsearch\
**Created:** [July 28, 2014, 5:49pm UTC](https://discuss.elastic.co/t/mapperparsingexception-need-help-with-dynamic-property-types/18932 "2014-07-28T17:49:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradeepjawahar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pradeepjawahar](https://discuss.elastic.co/u/pradeepjawahar)\
**Post date:** [July 28, 2014, 5:49pm UTC](https://discuss.elastic.co/t/mapperparsingexception-need-help-with-dynamic-property-types/18932/1 "2014-07-28T17:49:22Z")

</div>

I writing an application to index application logs into Elasticsearch. I'm  
having a problem when the type of a property changes in my data.  
The following works fine

$ curl -XPOST [http://localhost:9200/idx1/typ1](http://localhost:9200/idx1/typ1) -d '

> {"data": [  
> "0d7e6233e5f48b4f55c5376bf00b1be5",  
> "0d7e6233e5f48b4f55c5376bf00d94cf"  
> ]}'  
> {"ok":true,"\_index":"idx1","\_type":"typ1","\_id":"ntIyc5qfTnOPOz9uJ2dALg","\_version":1}

But when I try to index another data point I run into the following problem  
$ curl -XPOST [http://localhost:9200/idx1/typ1](http://localhost:9200/idx1/typ1) -d '  
{"data":[  
{  
"k1":"val1"  
},  
{  
"k2":"val2",  
"k3":"val3"  
}  
],}'  
{"error":"MapperParsingException[failed to parse [data]]; nested:  
ElasticSearchIllegalArgumentException[unknown property [text]];  
","status":400}

I understand that Elasticsearch does not allow the type of a property to  
be changed and that's causing the above Exception. I am usinn dynamic  
mapping.Is there anyway I can circumvent this problem. I have tried the  
following solutions :

1. As suggested here  
[http://stackoverflow.com/questions/15583032/nested-documents-in-elasticsearch](http://stackoverflow.com/questions/15583032/nested-documents-in-elasticsearch) to  
split my data.
2. To use some kind of a filter so that Elasticsearch always considers the  
field `data` to be an array of nested objects instead of an arrays of  
strings

The problem with the above two solutions are that I have several fields  
which have the above characteristics and not all of them are known before  
hand. So there could be a new field that's added to my data which behaves  
roguely.

My question is there a standard procedure to seal with such indexing  
issues. Any help will be much appreciated. I am using 0.90.5 on a centos5  
host.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/21b999d3-fe90-48b7-aaaa-a93f3c02e5f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/21b999d3-fe90-48b7-aaaa-a93f3c02e5f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:12am UTC](https://discuss.elastic.co/t/mapperparsingexception-need-help-with-dynamic-property-types/18932/2 "2017-07-06T01:12:44Z")

</div>


