# "unknown property" error on latest release, didn't used to happen

**URL:** <https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595>\
**Category:** Elasticsearch\
**Created:** [April 15, 2013, 9:35pm UTC](https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595 "2013-04-15T21:35:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_6](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jason\_6](https://discuss.elastic.co/u/Jason_6)\
**Post date:** [April 15, 2013, 9:35pm UTC](https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595/1 "2013-04-15T21:35:29Z")

</div>

Hi folks,

I just updated to 0.20.6 and I'm getting the following exception that I  
didn't used to get:

org.elasticsearch.ElasticSearchIllegalArgumentException: unknown property [  
badv]  
at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField(  
StringFieldMapper.java:276)  
at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField(  
StringFieldMapper.java:46)  
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(  
AbstractFieldMapper.java:307)

This "badv" property is a particular field in the document that is not  
explicitly defined in the schema, but there are a bunch of fields that fall  
into this category so I have the following in my schema:

'dynamic\_templates': [  
{  
'all\_fields': {  
'match': '\*',  
'mapping': {  
'type': 'string'  
}  
}  
}  
],

Previously this would catch any field in the doc that was not explicitly  
defined in the schema and just index it as a string. Now I seems to not be  
working.

Any idea why I would now be getting this error?

(P.S. I upgraded from 0.19.12 because of an NPE within ES so can't really  
go back)

Both the schema and the document being indexed are attached.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jason\_6](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jason\_6](https://discuss.elastic.co/u/Jason_6)\
**Post date:** [April 15, 2013, 11:01pm UTC](https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595/2 "2013-04-15T23:01:18Z")

</div>

Looks like this was introduced as a result of this issue:

> <https://github.com/elastic/elasticsearch/issues/2354>
>
> Hi, 
> 
> On an empty 1 node cluster elasticsearch v0.19.10, I want to reproduce a M…apperParsingException\[object mapping for \[my\_type\] tried to parse as object, but got EOF, has a concrete value been provided to it?\]
> 
> But it's not so easy, here is the script I loop on:
> 
> \`\`\`
> curl -s -XDELETE http://localhost:9200/my\_index/?pretty=true;
> 
> curl -s -XPUT 'http://localhost:9200/\_bulk?pretty=true' --data-binary '
> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> {"obj":{"key":"value"}}
> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> {"obj":"value"}
> '
> \`\`\`
> 
> Sometimes I have the Exception, and sometimes not : 
> 
> \`\`\`
> \[root@dahu share\]# curl -s -XDELETE http://localhost:9200/my\_index/?pretty=true;
> 
> curl -s -XPUT 'http://localhost:9200/\_bulk?pretty=true' --data-binary '
> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> {"obj":{"key":"value"}}
> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> {"obj":"value"}
> '{
> "ok" : true,
> "acknowledged" : true
> }\[root@dahu share\]#
> \[root@dahu share\]# curl -s -XPUT 'http://localhost:9200/\_bulk?pretty=true' --data-binary '
> \> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> \> {"obj":{"key":"value"}}
> \> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> \> {"obj":"value"}
> \> '
> {
> "took" : 221,
> "items" : \[ {
> "create" : {
> "\_index" : "my\_index",
> "\_type" : "my\_type",
> "\_id" : "QJz1\_TNWT9yhf7Mu5cRlDw",
> "\_version" : 1,
> "ok" : true
> }
> }, {
> "create" : {
> "\_index" : "my\_index",
> "\_type" : "my\_type",
> "\_id" : "ibUrM7JzRaGfalbgaF-aTA",
> "error" : "MapperParsingException\[object mapping for \[my\_type\] tried to parse as object, but got EOF, has a concrete value been provided to it?\]"
> }
> } \]
> }\[root@dahu share\]#
> 
> 
> \[root@dahu share\]# curl -s -XDELETE http://localhost:9200/my\_index/?pretty=true;
> curl -s -XPUT 'http://localhost:9200/\_bulk?pretty=true' --data-binary '
> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> {"obj":{"key":"value"}}
> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> {"obj":"value"}
> '{
> "ok" : true,
> "acknowledged" : true
> }\[root@dahu share\]#
> \[root@dahu share\]# curl -s -XPUT 'http://localhost:9200/\_bulk?pretty=true' --data-binary '
> \> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> \> {"obj":{"key":"value"}}
> \> {"index":{"\_index":"my\_index","\_type":"my\_type"}}
> \> {"obj":"value"}
> \> '
> {
> "took" : 251,
> "items" : \[ {
> "create" : {
> "\_index" : "my\_index",
> "\_type" : "my\_type",
> "\_id" : "N2PS-hoPQv2mLN7wzkZFHg",
> "\_version" : 1,
> "ok" : true
> }
> }, {
> "create" : {
> "\_index" : "my\_index",
> "\_type" : "my\_type",
> "\_id" : "-G9gf7kYRTi3Jb2A4-OsVQ",
> "\_version" : 1,
> "ok" : true
> }
> } \]
> \`\`\`
> 
> Quite strange...

But in my case I have a fresh index with 0 documents and I get this error  
on the very first attempt to index.

On Monday, April 15, 2013 2:35:29 PM UTC-7, Jason wrote:

> Hi folks,
> 
> I just updated to 0.20.6 and I'm getting the following exception that I  
> didn't used to get:
> 
> org.elasticsearch.ElasticSearchIllegalArgumentException: unknown property  
> [badv]  
> at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField  
> (StringFieldMapper.java:276)  
> at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField  
> (StringFieldMapper.java:46)  
> at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(  
> AbstractFieldMapper.java:307)
> 
> This "badv" property is a particular field in the document that is not  
> explicitly defined in the schema, but there are a bunch of fields that fall  
> into this category so I have the following in my schema:
> 
> 'dynamic\_templates': [  
> {  
> 'all\_fields': {  
> 'match': '\*',  
> 'mapping': {  
> 'type': 'string'  
> }  
> }  
> }  
> ],
> 
> Previously this would catch any field in the doc that was not explicitly  
> defined in the schema and just index it as a string. Now I seems to not be  
> working.
> 
> Any idea why I would now be getting this error?
> 
> (P.S. I upgraded from 0.19.12 because of an NPE within ES so can't really  
> go back)
> 
> Both the schema and the document being indexed are attached.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jason\_6](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jason\_6](https://discuss.elastic.co/u/Jason_6)\
**Post date:** [April 15, 2013, 11:32pm UTC](https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595/3 "2013-04-15T23:32:13Z")

</div>

OK.. I have a simple test case to reproduce:

curl -XDELETE "[http://localhost:9200/test/](http://localhost:9200/test/)"

curl -XPUT "[http://localhost:9200/test/](http://localhost:9200/test/)"

curl -XPUT [http://localhost:9200/test/test/\_mapping](http://localhost:9200/test/test/_mapping) -d '  
{  
"test": {  
"dynamic\_templates": [  
{  
"all\_fields": {  
"match": "\*",  
"mapping": {  
"type": "string"  
}  
}  
}  
],  
"properties": {  
"meta": {  
"type": "object",  
"properties": {  
"timestamp": {  
"store": "yes",  
"type": "date"  
},  
"foo": {  
"type": "object",  
"properties": {  
"bar": {  
"index": "not\_analyzed",  
"store": "yes",  
"type": "string"  
}  
}  
}  
}  
}  
}  
}  
}'

curl -XPUT [http://localhost:9200/test/test/1](http://localhost:9200/test/test/1) -d '  
{  
"meta": [{  
"timestamp": 1234567890,  
"foo": {  
"bar" : "Hello World"  
},  
"fruits" : {  
"canned": {  
"orchard" : ["Apples", "Oranges", "Peaches"]  
}  
}  
}]  
}'

This results in:

{  
"error": "MapperParsingException[Failed to parse [meta.fruits]];  
nested: ElasticSearchIllegalArgumentException[unknown property [canned]]; ",  
"status": 400  
}

On Monday, April 15, 2013 2:35:29 PM UTC-7, Jason wrote:

> Hi folks,
> 
> I just updated to 0.20.6 and I'm getting the following exception that I  
> didn't used to get:
> 
> org.elasticsearch.ElasticSearchIllegalArgumentException: unknown property  
> [badv]  
> at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField  
> (StringFieldMapper.java:276)  
> at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField  
> (StringFieldMapper.java:46)  
> at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(  
> AbstractFieldMapper.java:307)
> 
> This "badv" property is a particular field in the document that is not  
> explicitly defined in the schema, but there are a bunch of fields that fall  
> into this category so I have the following in my schema:
> 
> 'dynamic\_templates': [  
> {  
> 'all\_fields': {  
> 'match': '\*',  
> 'mapping': {  
> 'type': 'string'  
> }  
> }  
> }  
> ],
> 
> Previously this would catch any field in the doc that was not explicitly  
> defined in the schema and just index it as a string. Now I seems to not be  
> working.
> 
> Any idea why I would now be getting this error?
> 
> (P.S. I upgraded from 0.19.12 because of an NPE within ES so can't really  
> go back)
> 
> Both the schema and the document being indexed are attached.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jason\_5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_5/32/1873_2.png) [@Jason\_5](https://discuss.elastic.co/u/Jason_5)\
**Post date:** [April 16, 2013, 5:19pm UTC](https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595/4 "2013-04-16T17:19:58Z")

</div>

Issue logged (and replied to) here:

> <https://github.com/elastic/elasticsearch/issues/2898>
>
> I'm not sure if the title of this is correct, because I'm not sure what the caus…e of this is, but here's what I'm seeing:
> 
> The following sequence of commands will fail:
> 
> \`\`\`
> curl -XDELETE "http://localhost:9200/test/"
> 
> curl -XPUT "http://localhost:9200/test/"
> 
> curl -XPUT http://localhost:9200/test/test/\_mapping -d '
> {
> "test": {
> "dynamic\_templates": \[
> {
> "all\_fields": {
> "match": "\*",
> "mapping": {
> "type": "string"
> }
> }
> }
> \],  
> "properties": {
> "meta": {
> "type": "object",
> "properties": {
> "timestamp": {
> "store": "yes",
> "type": "date"
> },
> "foo": {
> "type": "object",
> "properties": {
> "bar": {
> "index": "not\_analyzed",
> "store": "yes",
> "type": "string"
> }
> }
> }
> }
> }
> }
> }
> }'
> 
> 
> curl -XPUT http://localhost:9200/test/test/1 -d '
> {
> "meta": \[{
> "timestamp": 1234567890,
> "foo": {
> "bar" : "Hello World"
> },
> "fruits" : {
> "canned": {
> "orchard" : \["Apples", "Oranges", "Peaches"\]
> }
> }
> }\]
> }'
> \`\`\`
> 
> The failure is
> 
> \`\`\`
> {
> "error": "MapperParsingException\[Failed to parse \[meta.fruits\]\]; nested: ElasticSearchIllegalArgumentException\[unknown property \[canned\]\]; ",
> "status": 400
> }
> \`\`\`
> 
> It's not clear from the documentation why this doesn't work, or how one would assign a default type to unexpected field values if this mapping approach is wrong.
> 
> The issue seems to have been introduced from this commit:
> 
> https://github.com/elasticsearch/elasticsearch/commit/6243f8e64d994ec1e0a45328cdc80f1ba1d87bb6

On Monday, April 15, 2013 2:35:29 PM UTC-7, Jason wrote:

> Hi folks,
> 
> I just updated to 0.20.6 and I'm getting the following exception that I  
> didn't used to get:
> 
> org.elasticsearch.ElasticSearchIllegalArgumentException: unknown property  
> [badv]  
> at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField  
> (StringFieldMapper.java:276)  
> at org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField  
> (StringFieldMapper.java:46)  
> at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(  
> AbstractFieldMapper.java:307)
> 
> This "badv" property is a particular field in the document that is not  
> explicitly defined in the schema, but there are a bunch of fields that fall  
> into this category so I have the following in my schema:
> 
> 'dynamic\_templates': [  
> {  
> 'all\_fields': {  
> 'match': '\*',  
> 'mapping': {  
> 'type': 'string'  
> }  
> }  
> }  
> ],
> 
> Previously this would catch any field in the doc that was not explicitly  
> defined in the schema and just index it as a string. Now I seems to not be  
> working.
> 
> Any idea why I would now be getting this error?
> 
> (P.S. I upgraded from 0.19.12 because of an NPE within ES so can't really  
> go back)
> 
> Both the schema and the document being indexed are attached.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:40am UTC](https://discuss.elastic.co/t/unknown-property-error-on-latest-release-didnt-used-to-happen/11595/5 "2017-07-06T02:40:54Z")

</div>


