gpt4 book ai didi

elasticsearch - Elasticsearch 的配置位置是什么?同义词文件应该放在哪里?

转载 作者:行者123 更新时间:2023-12-02 22:12:46 33 4
gpt4 key购买 nike

我想使用 Elasticsearch 的同义词功能。我不知道把它放在哪里。需要帮忙!

最佳答案

您可以将同义词文件放在相对于配置位置的路径中。

你可以看看Directory layout您的 ES 设置。
它包含一个 config您可以在其中放置 synonym 的文件夹文件,然后指定该文件的相对路径。

例如

    "filter" : {
"synonym" : {
"type" : "synonym",
"synonyms_path" : "analysis/synonym.txt"
}
}

The above configures a synonym filter, with a path of analysis/synonym.txt (relative to the config location).



this了解更多详情

编辑:

您还可以指定绝对路径。根据文档

The path to the synonyms file should be specified with the synonyms_path parameter, and should be either absolute or relative to the Elasticsearch config directory.



引用 this

关于elasticsearch - Elasticsearch 的配置位置是什么?同义词文件应该放在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44258708/

33 4 0