Sometimes, we may need to ignore the case of our query, with respect to the match in the document. An analyzer can be used in this case to ignore the case while searching. Each field will have to contain this analyzer in it's property, in order to work:
"settings": {
"analysis": {
"analyzer": {
"case_insensitive": {
"tokenizer": "keyword",
"filter": ["lowercase"]
}
}
}
}