This is a known limitation of using the SynonymFilter and expanding to
variants of different sizes at query time.  See the notes for
SynonymFilterFactory here:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46


-Yonik
http://www.lucidimagination.com


On Tue, Mar 31, 2009 at 3:24 PM, Leonardo Dias <leona...@catho.com.br> wrote:
> Hello there. How are you guys?
>



> We're having problems with synonyms here and I thought that maybe you guys
> could help us on how SOLR works for synonyms.
>
> The problem is the following: I'd like to setup a synonym like "dba,
> database administrator".
>
> Instead of increasing the number of results for the keyword "dba", the
> results got smaller and it only brought me back results that had both the
> keywords "dba" and "database administrator" at the same time instead of
> bringing back both "dba" and "database administrator" as expected since our
> synonym configuration is using expand=true.
>
> Since in the past this was not the expected behavior, I'd like to know
> whether something changed in the solr/lucene internals so that this
> functionality is now lost, or if I'm doing something wrong with my setup.
>
> Currently all fields pass through the Synonym filter factory. The analysis
> shows me that it tries to search for database administrator and DBA. A debug
> query also shows me that the query it's trying to do is something like this:
>
> +DisjunctionMaxQuery((title:"(dba datab) administr")~0.1)
> DisjunctionMaxQuery((title:"(dba datab) administr"^100000.0 |
> observation:"(dba datab) administr"^10.0 | description:"(dba datab)
> administr"^10.0 | company:"(dba datab) administr")~0.1)
>
> The problem is: when I search for this, I get 5 results. When I search for
> dba only, without the "dba, database administrator" line in the synonyms.txt
> file, I get more than 100 results.
>
> Do you guys know why this is happening?
>
> Thank you,
>
> Leonardo
>

Reply via email to