How to use SynonymFilterFactory in Solr?

Posted by AlxVallejo on Stack Overflow See other posts from Stack Overflow or by AlxVallejo
Published on 2012-04-03T17:38:11Z Indexed on 2012/11/15 17:00 UTC
Read the original article Hit count: 165

Filed under:

I'm trying to execute synonym filtering at query time so that if I search for X, results for Y also show up.

I go to where Solr is being run, edit the .txt file and add X, Y on a new line.

This does not work. I check the schema and I see:

<analyzer type="query">
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true" />

What am I missing?

EDIT Assessing configuration files

tomcat6/Catalina/localhost seems to point to the correct location

<Context docBase="/data/solr/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="/data/solr" override="true" />
</Context>

Also, in the Solr admin I see this. What does cwd mean?

cwd=/usr/share/tomcat6 SolrHome=/data/solr/ 

© Stack Overflow or respective owner

Related posts about solr