"Term" queries fail against ES 5.5.2 for SingleList, MultiList, SingleDropdown, ect components
Environment:
- local ES, version 5.5.2
- "@appbaseio/reactivesearch": "v1.0.0-beta05",
- I am using the SingleList component, although this issue impacts all components that build a type query.
Issue In my environment, when I use the SingleList, MultiList, SingleDropDown, or anything else that constructs a "Term" query, I get " 400 (Bad Request)" when selecting items.
I got the request payload and manually executed it with curl and it comes back with the same error as the web console.
curl -XPOST 'localhost:9200/app/_search?pretty' -d '
{
"query":{
"bool":{
"must":[
{
"Term":{
"primaryRole.raw":"ASD"
}
},
{
"range":{
"band":{
"from":7,
"to":9
}
}
}
]
}
},
"size":20,
"from":0
}
'
which gives me the following error
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "no [query] registered for [Term]",
"line" : 7,
"col" : 23
}
],
"type" : "parsing_exception",
"reason" : "no [query] registered for [Term]",
"line" : 7,
"col" : 23
},
"status" : 400
}
when I change this to "Term" from "term", the query is executed correctly.
curl -XPOST 'localhost:9200/app/_search?pretty' -d '
{
"query":{
"bool":{
"must":[
{
"term":{
"primaryRole.raw":"Business Analyst"
}
},
{
"range":{
"band":{
"from":7,
"to":9
}
}
}
]
}
},
"size":20,
"from":0
}
'
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
Maybe this has something to do with versioning, but it looks like the case of the "term" construction needs to be updated.
Hi @aaronmyhre, this issue has been fixed and released in version 1.3.3
woot! Thanks so much @metagrover. Already have it running in my app and all is working now.