Hi everyone,

I'm having a bit of problem with synonyms.

My synonyms.txt looks like this:

> class\ 3\ (gvw\ 10001\ -\ 14000), light
> class 4 (gvw 14001 - 16000), class 5 (gvw 16001 - 19500), class 6 (gvw
> 19501 - 26000), medium
>

When testing in analyzer by using solr admin light gets correctly
recognised as one of the synonims, but when searching for  class 3 (gvw
10001 - 14000) analyzer can't find any synonyms.
As you can see I tried escaping whitespaces with \ but that didn't help.

Configuration of used field is

> !-- lowercases the entire field value, keeping it as a single token.  -->
>       <!-- used for working with synonyms -->
>     <fieldType name="lowercase_syn" class="solr.TextField"
> positionIncrementGap="100">
>       <analyzer type="index">>
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory" />
>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>       </analyzer>
>       <analyzer type="query">>
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory" />
>       </analyzer>
>     </fieldType>
>

Could you please help me?
Thanks

Reply via email to