elasticsearch/elasticsearch — pull request #4252 by marevol (2013-11-26 07:41:32+00:00)
Title: Use tokenizer's settings in a setting of SynonymTokenFilter

In the following index setting, synonymTest uses own settings, not bigramTokenizer's one (synonymTest does not use min_gram and max_gram). I think that it's better to use bigramTokenizer's setting.

curl -XPUT localhost:9200/test -d '{
"settings" : {
"analysis" : {
"analyzer" : {
"bigram_analyzer" : {
"type" : "custom",
"tokenizer" : "bigramTokenizer",
"filter" : ["synonymTest"]
}
},
"tokenizer" : {
"bigramTokenizer" : {
"type" : "ngram",
"min_gram" : 2,
"max_gram" : 2
}
},
"filter" : {
"synonymTest" : {
"type" : "synonym",
"synonyms_path" : "synonym.txt",
"tokenizer" : "bigramTokenizer"
}
}
}
}
}'