Hi Brad,
I suspect that this section from the wiki for SynonymFilterFactory might be relevant: http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory *"Keep in mind that while the SynonymFilter will happily work with synonyms containing multiple words (ie: "**sea biscuit, sea biscit, seabiscuit**") The recommended approach for dealing with synonyms like this, is to expand the synonym when indexing. This is because there are two potential issues that can arrise at query time:* 1. *The Lucene QueryParser tokenizes on white space before giving any text to the Analyzer, so if a person searches for the words **sea biscit** the analyzer will be given the words "sea" and "biscit" seperately, and will not know that they match a synonym."* ... Tom On Tue, Nov 24, 2009 at 10:47 AM, brad anderson <solrinter...@gmail.com>wrote: > Hi Folks, > > I was trying to get multi term synonyms to work. I'm experiencing some > strange behavior and would like some feedback. > > In the synonyms file I have the line: > > thomas, boll holly, thomas a, john q => tom > > And I have a document with the text field as; > > tom > > However, when I do a search on boll holly, it does not return the document > with tom. The same thing happens if I do a query on john q. But if I do a > query on thomas, it gives me the document. Also, if I quote "boll holly" or > "john q" it gives back the document. > > When I look at the analyzer page on the solr admin page, it is transforming > "boll holly" to "tom" when it isn't quoted. Why is it that it is not > returning the document? Is there some configuration I can make so it does > return the document if I do an unquoted search on "boll holly"? > > My synonym filter is defined as follows, and is only defined on the query > side: > > <filter class="solr.SynonymFilterFactory" > synonyms="synonyms.txt" ignoreCase="true" expand="true"/> > > > I've also tried changing the synonym file to be > > tom, thomas, boll holly, thomas a, john q > > This produces the same results. > > Thanks, > Brad >