ElasticSearch returns me "No query registered for [likes_count]" error when trying to look up entries using the following query. The field likes_count is a new field of documents and does not exist in every document.
The same query works without the sort part.
Why does this error appear?
Thanks
{
"query": {
"filtered": {
"query": {
"query_string": {
"fields": ["description"],
"query": "sun"
},
"sort": [{
"likes_count": {
"unmapped_type": "boolean",
"order": "desc",
"missing": "_last"
}
}]
},
"filter": {"term": {"permissions": 1}}
}
}
}