It is recommended [1] to use synonyms at index time only for various reasons especially with multi-word synonyms.
[1]http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory only at index time use expand=true ingoreCase=true with synonym.txt : micheal, michael OR: micheal jackson, michael jackson Note it it is important to what filters you have before synonym filter. Bu sure that you restart tomcat and re-index. Query Micheal Jackson (not phrase search) should return the results for Michael Jackson. Hope this helps. --- On Thu, 11/12/09, Nair, Manas <manas.n...@mtvnmix.com> wrote: > From: Nair, Manas <manas.n...@mtvnmix.com> > Subject: Multi word synonym problem > To: solr-user@lucene.apache.org > Cc: "Arumugam, Senthil Kumar" <senthilkumar.arumu...@mtvncontractor.com> > Date: Thursday, November 12, 2009, 3:43 PM > Hi Experts, > > I would like help on multi word synonyms. The scenario is > like: > > I have a name Micheal Jackson(wrong term) which has a > synonym Michael Jackson i.e. > > Micheal Jackson => Michael Jackson > > When I try to search for the word Micheal Jackson (not a > phrase search), it is searching for text: Micheal , text: > Jackson and not for Michael Jackson. > But when I search for "Micheal Jackson" (phrase search), > solr is searching for "Michael Jackson" (the correct term). > > The schema.xml for the particular core contains the > SynonymFilterFactory for text analyzer and is enabled during > index as well as query time. The SynonymFilterFactory > during index and query time has the parameter expand=true. > > Please help me as to how a multiword synonym can be made > effective i.e I want a search for > Micheal Jackson (not phrase search) to return the results > for Michael Jackson. > > What should be done so that Micheal Jackson is considered > as one search term instead of splitting it. > > Any help is greatly appreciated. > > Thankyou, > Manas Nair >