the text field publisher the mapping and the index setting for books
"publisher": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256,
"normalizer": "lowercase_normalizer"
}
},
"analyzer": "lowercase_analyzer"
},
and index setting:
"analysis": {
"normalizer": {
"lowercase_normalizer": {
"filter": [
"lowercase"
],
"type": "custom"
}
},
"analyzer": {
"lowercase_analyzer": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "standard"
}
},
How can I make an Elasticsearch _sql
call to return the raw (original case) text value instead of the lowercase value stored in the keyword
subfield in my GROUP BY
query? For example: select publisher, count() from books group by publisher; or select left(publisher,10), count() from books group by left(publisher,10);