bells / elasticsearch-analysis-dynamic-synonym

The dynamic synonym plugin adds a synonym token filter that reloads the synonym file(local file or remote file) at given intervals (default 60s).
372 stars 182 forks source link

ES 7.5.0 compatibility #60

Open hellracer opened 4 years ago

hellracer commented 4 years ago

Hi,

May i ask any chance that this could be compatible with ES 7.5.0?

lryong commented 4 years ago

@hellracer In src/main/java/com/bellszhu/elasticsearch/plugin/synonym/analysis/DynamicSynonymTokenFilterFactory.java, you can just modify line 147 to support with Elasticsearch 7.5.0, like below:

return new CustomAnalyzer(tokenizer, charFilters.toArray(new CharFilterFactory[0])

Epilum commented 11 months ago

{ return new CustomAnalyzer( tokenizer, charFilters.toArray(new CharFilterFactory[0]), tokenFilters.stream().map(TokenFilterFactory::getSynonymFilter).toArray(TokenFilterFactory[]::new) ); }

大佬 可以具体说一下在哪里更改吗?