Below is the json passed into elasticsearch js client.
- Is the
query_string
treated as query here? How do I declare it as a filter? - How come this works given that my top element is
filter
?
{
"index": "index",
"sort": [
"shop.chaosEquiv:asc"
],
"from": 0,
"size": 50,
"body": {
"filter": {
"query": {
"query_string": {
"default_operator": "AND",
"query": "info.name:\"Sire of Shards\" attributes.league:\"Perandus\" shop.hasPrice:true shop.verified:YES"
}
}
}
}
}