Hi,
I need to perform an FTS search on words, it should be Non case-sensitive and including special chars.
Example: if I search for “sha-” it should return me: “Sha-”, “sHa-”, “SHA-”, “sha-”
I used “inherit” analyzer (the default analyzer is standard), but it doesn’t find special chars.
How to build custom analyzer for my requirement ?
Please note this is just one way of doing this. And there are many other ways to do this too and the specific approach depends on what all use cases you have to address.
Hi, Thanks for your quick replay, I try it now, but it doesn"t work.
It doesn’t find any name.
If I’m using “keyword” analyzer it works, but it is case-sensitive, I need analyzer like “keyword” which is not case-sensitive.
This is the json definition of the custom analyzer:
“analyzers”: {
“insensitive_specialChars”: {
“char_filters”: [
“asciifolding”
],
“token_filters”: [
“to_lower”
],
“tokenizer”: “unicode”,
“type”: “custom”
}
}
},