Hi.
I have a question about behavior of SynonymTokenFilterFactory class.

I expect that "settings" parameter of TokenizerFactory is tokenizer's 
settings. However, SynonymTokenFilterFactory passes indexSettings to 
"settings" parameter of TokenizerFactory. 

    final TokenizerFactory tokenizerFactory = 
tokenizerFactoryFactory.create(tokenizerName, indexSettings);

SynonymTokenFilterFactory was changed by the following commit.
https://github.com/elastic/elasticsearch/commit/ac4b39bd8f54c38f55a0b02f432c4ee5f47caf03#diff-594b28da352e9e981182b5466c294388

Is the behavior changed?


At Elasticsearch 1.3, the following setting works.  "bigramTokenizer" of 
synonymTest gets (min_gram/max_gram) settings.

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",
          "min_gram" : 2,
          "max_gram" : 2
        }
      }
    }
  }
}'

At Elasticsearch 1.5, it does not work. 

Thanks in advance,
Yosuke

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/dbcceb52-7b7a-45a3-ae48-2a844f414263%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to