Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using expand=true in Solr SynonymFilterFactory?

Tags:

solr

Solr doc explains the role of expand=true in SynonymFilterFactory as the followings:

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. 

I am wondering what it means exactly? If someone could elaborate on what it does, it will be great.

like image 390
kee Avatar asked Oct 21 '22 14:10

kee


1 Answers

From the Solr SynonymFilterFactory documentation on the Solr Wiki:

 # 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

Since Solr SynonymFilterFactory is now deprecated, the SynonymGraphFilterFactory class is now used. This answer still holds true for SynonymGraphFilterFactory.

like image 65
Paige Cook Avatar answered Oct 25 '22 19:10

Paige Cook