I am attempting to implement partial, case-incensitive matching in Elasticseach 7.
I am creating the index with the settings:
{
"merchant_3" : {
"settings" : {
"index" : {
"number_of_shards" : "2",
"provided_name" : "merchant_3",
"max_result_window" : "100000",
"creation_date" : "1592833582520",
"analysis" : {
"analyzer" : {
"englishAnalyzer" : {
"filter" : [
"lowercase"
],
"tokenizer" : "standard"
}
}
},
"number_of_replicas" : "1",
"uuid" : "5mjRMQ65TSGFFU0LfAH4eA",
"version" : {
"created" : "7060299"
}
}
}
}
}
and the mappings:
{
"merchant_3" : {
"mappings" : {
"properties" : {
"Name" : {
"type" : "keyword"
},
...
}
}
}
}
The following query returns the document correctly:
POST /merchant/_search
{
"query": {
"wildcard": {
"Name": "*Example*"
}
}
}
But when I lowercase the search term it does not return the document:
POST /merchant/_search
{
"query": {
"wildcard": {
"Name": "*example*"
}
}
}
How do I configure Elasticsearch to make it match the Name
field value using a lowercase search term?