Hi,

I'm trying to work out why Synonyms won't work for my installation of Solr.
Its a basic install (just using the "example" set, and have tweaked the
fields to what I need).

The files are all in:  (schema.xml, synonyms.txt etc), but for some reason
its not working: /var/home/site/solr/example/solr/conf

For the text_ws field I have this set:

    <!-- A text field that only splits on whitespace for exact matching of
words -->
    <fieldType name="text_ws" class="solr.TextField"
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
      </analyzer>
      <analyzer type="query">
        <!--<tokenizer class="solr.StandardTokenizerFactory"/> -->
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>

...and for the related fields I'm trying to search with the synonym file:

<field name="title"     type="text_ws"    indexed="true"  stored="true"
multiValued="false"  required="true" WhitespaceTokenizerFactory="true" />
  <field name="description"  type="text_ws"    indexed="true"
stored="true"  multiValued="false"  required="false"
WhitespaceTokenizerFactory="true"  />
  <field name="keywords"     type="text_ws"    indexed="true"
stored="true"  multiValued="false"  required="false"
WhitespaceTokenizerFactory="true"  />

In my synonynm file I have this example:

car => mascot
mascot => car

..and in Solr I actually have a result with the "description" of "<str
name="description">bird hawk mascot 002 (u65bsag)</str>"

...surely my setup should be showing that result?

I've been doing my head in over this - so any advice would be much
appreciated :)

TIA!
-- 
Andy Newby <a...@ultranerds.co.uk>

Reply via email to