`
m635674608
  • 浏览: 4930595 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

es 同义词 热更新

 
阅读更多

Updating Stopwordsedit

A few techniques can be used to update the list of stopwords used by an analyzer. Analyzers are instantiated at index creation time, when a node is restarted, or when a closed index is reopened.

If you specify stopwords inline with the stopwords parameter, your only option is to close the index and update the analyzer configuration with the update index settings API, then reopen the index.

Updating stopwords is easier if you specify them in a file with the stopwords_path parameter. You can just update the file (on every node in the cluster) and then force the analyzers to be re-created by either of these actions:

  • Closing and reopening the index (see open/close index), or
  • Restarting each node in the cluster, one by one

Of course, updating the stopwords list will not change any documents that have already been indexed. It will apply only to searches and to new or updated documents. To apply the changes to existing documents, you will need to reindex your data. See Reindexing Your Data.

post http://127.0.0.1:9200//zzm/_close

post http://127.0.0.1:9200//zzm/_open

 

curl -XPOST 'localhost:9200/my_index/_close' curl -XPOST 'localhost:9200/my_index/_open'

 

https://www.elastic.co/guide/en/elasticsearch/guide/current/using-stopwords.html#updating-stopwords

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics