-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
Hiya
It looks like you are parsing JSON as a stream, where position matters, instead of parsing the whole objects before analysing them. For instance, this works:
curl -XGET 'http://127.0.0.2:9200/_all/_search' -d '
{ query:
{
"filteredQuery" : {
"query" : {
"term" : {
"text" : "foo"
}
},
"filter" : {
"range" : {
"num" : {
"from" : 10,
"to" : 20
}
}
}
}
}
}
'
But this fails:
curl -XGET 'http://127.0.0.2:9200/_all/_search' -d '
{ query:
{
"filteredQuery" : {
"filter" : {
"range" : {
"num" : {
"to" : 20,
"from" : 10
}
}
},
"query" : {
"term" : {
"text" : "foo"
}
}
}
}
}
'
A JSON parser should consider these two structures to be identical, which is also the thing that rules out having non-unique property names.
thanks
Clint
(Edited to correct JSON)