从Magento 2运行indexer:reindex时,Elasticsearch中的not_analyzed设置将被删除

时间:2019-06-03 06:57:45

标签: elasticsearch magento2

在Magento 2安装中,我正在使用Elasticsearch作为搜索引擎。当用破折号(-)搜索SKU时,由于默认情况下Elasticsearch会拆分并搜索这些值,因此会检索到许多值。

示例:搜索11-22 SKU将返回带有11,22和11-22的SKU。

该链接应该通过将SKU属性设置为not_analyzed来解决 https://www.elastic.co/guide/en/elasticsearch/guide/current/_finding_exact_values.html

但是,当运行'php bin / magento indexer:reindex'时,Elasticsearch索引版本会增加,并且not_analyzed设置会被删除。

有没有一种方法可以设置Elasticsearch索引,以使将来从Magento重新编制索引不会覆盖自定义设置?

0 个答案:

没有答案