I have a token filter and analyzer as follows. However, I can't get the original token to be preserved. For example, if I _analyze
using the word : saint-louis
, I get back only saintlouis
, whereas I expected to get both saintlouis and saint-louis
as I have my preserve_original set to true
. The ES version i am using is 6.3.2 and Lucene version is 7.3.1
"analysis": {
"filter": {
"hyphenFilter": {
"pattern": "-",
"type": "pattern_replace",
"preserve_original": "true",
"replacement": ""
}
},
"analyzer": {
"whitespace_lowercase": {
"filter": [
"lowercase",
"asciifolding",
"hyphenFilter"
],
"type": "custom",
"tokenizer": "whitespace"
}
}
}