I have a mapping that includes "DBAName" and I can search/query based on that field. It shows up in all my results.
But, when I try to sort by that field, I get: "No mapping found for [DBANAME] in order to sort on"
The mapping looks like:
"DBAName" : {
"type": "string",
"fielddata": true
},
My query looks like:
GET /provider/providers/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"DBAName": "Hospice"
}
},
{
"match": {
"ProviderAddress.State": "CA"
}
}
]
}
},
"sort": [{"DBAName": {"order":"desc"}}]
}