Keyword Insensitive Match

any way to make a keyword type case insensitive ? an example would be me using match query and the input would be "input" and the output "InPuT"

You can use a lowercase normalizer.

the problem i have now is that the normalizer applys for all my fields? i want my username field to be case insensitive but my email field to not have anything

EDIT

this method seems to work but im not sure its the right way

"settings": {
    "analysis": {
        "normalizer": {
            "lowercase": {
                "type": "custom",
                "filter": "lowercase"
            }
        }
    },
    "number_of_replicas": 0,
    "auto_expand_replicas": false
},
"mappings": {
    "properties": {
        "username": {
            "type": "keyword",
            "normalizer": "lowercase"
        },
        "email": {
            "type": "keyword"
        }
    }
}

It is.

does this normalizer have any limitations ? like certain characters that arent allowed?

I don't think so.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.