Elasticsearch version : 5.2.1
Plugins installed: none
JVM version:
openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu 8.25.0.1-macosx) (build 1.8.0_152-b16)
OpenJDK 64-Bit Server VM (Zulu 8.25.0.1-macosx) (build 25.152-b16, mixed mode)
OS version:
Darwin Jorg-Prantes-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
The JSON format with a space as field name that was accepted up to Elastiscearch 5.2.0 should also be accepted by Elasticsearch 5.2.1+
This could be related to #22891
The fix seems to forbid space as field name, but the intention was only to forbid empty field names.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
- Putting this JSON to Elasticsearch with curl
curl -XPUT 'http://localhost:9200/testindex/1/1' -d '
{
"600": [
{
"07": [
{
"a": "Supports."
}
]
},
{
"07": [
{
"a": "."
},
{
" ": "Surfaces <Künstlergemeinschaft>"
}
]
}
]
}
'
- Examine server log.
- There should be no error.
Provide logs (if relevant):
java.lang.IllegalArgumentException: object field starting or ending with a [.] makes object resolution ambiguous: [ ]
at org.elasticsearch.index.mapper.DocumentParser.splitAndValidatePath(DocumentParser.java:182) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.getMapper(DocumentParser.java:922) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseValue(DocumentParser.java:573) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:395) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:372) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:446) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:466) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseNonDynamicArray(DocumentParser.java:554) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseArray(DocumentParser.java:510) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:384) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:372) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:446) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:466) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseNonDynamicArray(DocumentParser.java:554) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseArray(DocumentParser.java:510) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:384) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:372) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:93) ~[elasticsearch-5.2.1.jar:5.2.1]
at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:66) ~[elasticsearch-5.2.1.jar:5.2.1]
Elasticsearch version : 5.2.1
Plugins installed: none
JVM version:
openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu 8.25.0.1-macosx) (build 1.8.0_152-b16)
OpenJDK 64-Bit Server VM (Zulu 8.25.0.1-macosx) (build 25.152-b16, mixed mode)
OS version:
Darwin Jorg-Prantes-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
The JSON format with a space as field name that was accepted up to Elastiscearch 5.2.0 should also be accepted by Elasticsearch 5.2.1+
This could be related to #22891
The fix seems to forbid space as field name, but the intention was only to forbid empty field names.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
Provide logs (if relevant):