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

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.
For more options, visit https://groups.google.com/groups/opt_out.

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

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.
For more options, visit https://groups.google.com/groups/opt_out.

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

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"]
}
}
}]
}'

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.
For more options, visit https://groups.google.com/groups/opt_out.

Issue logged (and replied to) here:

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.
For more options, visit https://groups.google.com/groups/opt_out.