Search a keyword with insensitive word

I had case in my elasticsearch. i want to find the field with value "Aku & Kamu . Co". i using Keyword and i get the field, but problem come when i find with "aku & kamu". how can i slove this? is that the keyword support insensitive input?

You would need to use a lowercase normalizer.

How can i use thats? Can i using that in the old index? Or need create new one?

The documentation contains examples. See https://www.elastic.co/guide/en/elasticsearch/reference/current/normalizer.html

You need to create a new index for that.

But I just answered your question.
May be you are not using the right data type though and you should use text instead of keyword? Or both if you want to cover multiple use cases on the same field, like full text search and sort/agg.

"pengirim" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}

thats my mapping. can i solve it without created new index? if i use a text it cant search a spesial char like & or @ and it cant search dot (.) right?

True. Unless you changed the default analyzer to something which suits your use case.

No

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