在Solr SynonymFilterFactory中使用expand = true?

kee*_*kee 5 solr

Solr doc解释了expand = true在SynonymFilterFactory中的作用如下:

a synonym will be expanded to all equivalent synonyms. 
If it is false, all equivalent synonyms will be reduced to the first in the list. 
Run Code Online (Sandbox Code Playgroud)

我想知道它究竟意味着什么?如果有人可以详细说明它的作用,那就太好了.

Pai*_*ook 3

来自Solr Wiki 上的Solr SynonymFilterFactory文档:

 # If expand==true, "ipod, i-pod, i pod" is equivalent to the explicit mapping:
 ipod, i-pod, i pod => ipod, i-pod, i pod

 # If expand==false, "ipod, i-pod, i pod" is equivalent to the explicit mapping:
 ipod, i-pod, i pod => ipod
Run Code Online (Sandbox Code Playgroud)

由于 Solr SynonymFilterFactory 现已弃用,因此现在使用 SynonymGraphFilterFactory 类。这个答案对于 SynonymGraphFilterFactory 仍然适用。

  • 这意味着如果您设置 Expand="true" 选项。然后,在上面列出的第一种情况下,每当您的字段包含 ipod、i-pod 或 i pod 作为术语时,它将用索引中的所有三个术语替换该术语。 (3认同)