Hi,
for some reason, if need to query (prefix) with an insensitive case on a text field, but I would like to keep the advantage of the tokenisation made by the default Analyzer on the same field, is it possible ?
Example
My indexed field (let's say three cases from input)
"productSearchName" : "best white chocolate"
"productSearchName" : "Best White Chocolate"
"productSearchName" : "BEST WhItE ChocolatE"
If I apply the standard Analyzer, the produced tokens will be
["best","white","chocolate"] for three syntax, but how to perform a Prefix query (start with "best white") ? Using the productSearchName.Keyword is impossible since the sensitive case.
However I can perform match query on any part of the indexed tokens.
If I apply a Normalizer like this one
"analysis": {
"normalizer": {
"case_insensitive": {
"filter": [
"lowercase"
],
"type": "custom"
}
}
then for the same productSearchName input, I 'll get only one token [ "best white chocolate"] which'll allow me to perform case insensitive prefix query, but now I can't easily perform a match query, I need to use a wildcard instead.
Well can someone tell me if both an Analyser and a Normalizer can be used by the same field producing at the same time the tokens ["best","white","chocolate"] and [ "best white chocolate"] allowing me to keep the power of match query (no wildcard then) and perform case insensitive prefix query at the same time ?
Many thanks