Hi,
Elastic (2.4) is unhappy with this search query, from the docs it looks approx right, any pointers gratefully received
{
"query":{
"query_string":{
"query":"news",
"default_operator":"AND"
},
"filtered":{
"filter":{
"bool":{
"must":[
{
"term":{
"status":"published"
}
},
{
"term":{
"include_in_search":1
}
},
{
"missing":{
"field":"deleted"
}
}
]
}
}
},
"constant_score":{
"filter":{
"range":{
"published":{
"gte":"now"
}
}
}
}
},
"sort":{
"TraceDateTime":{
"order":"desc",
"ignore_unmapped":"true"
}
}
}
The error is:
{
"error":{
"root_cause":[
{
"type":"parse_exception",
"reason":"failed to parse search source. expected field name but got [START_OBJECT]"
}
],
"type":"search_phase_execution_exception",
"reason":"all shards failed",
"phase":"query",
"grouped":true,
"failed_shards":[
{
"shard":0,
"index":"XXX",
"node":"j4ZKPe3HQ5Scet4uSd4QGg",
"reason":{
"type":"parse_exception",
"reason":"failed to parse search source. expected field name but got [START_OBJECT]"
}
}
]
},
"status":400
}
Thanks,
Jon