Skip to content

Commit e687786

Browse files
fix: set search_analyzer for n-grams to standard
* simple analyzer doesn't work with numbers, making auto suggestions fail for use-cases that rely on a combination of letters and numbers (e.g. serial numbers)
1 parent e7a998c commit e687786

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

util/es_template.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func SetDefaultIndexTemplate() error {
9494
"autosuggest": {
9595
"type": "text",
9696
"analyzer": "autosuggest_analyzer",
97-
"search_analyzer": "simple"
97+
"search_analyzer": "standard"
9898
},
9999
"keyword": {
100100
"type": "keyword",
@@ -103,7 +103,7 @@ func SetDefaultIndexTemplate() error {
103103
"search": {
104104
"type": "text",
105105
"analyzer": "ngram_analyzer",
106-
"search_analyzer": "simple"
106+
"search_analyzer": "standard"
107107
},
108108
"synonyms": {
109109
"type": "text",

0 commit comments

Comments
 (0)