You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rajini maski <ra...@gmail.com> on 2011/04/27 14:18:11 UTC

Facing problem with white space in synonyms

   Query related to solr synonymfilterfactory.  I am using Solr 1.4.1.


I have datatype field "textSynonym"

 <fieldType name="textSynonym" class="solr.TextField"
positionIncrementGap="100" >
      <analyzer>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
 </analyzer>
    </fieldType>
 <field name="BODY" type="textSynonym" indexed="true" stored="true"/>
 The steps followed are :

1) synonym.txt has  many words separated with a white space . Example
: Hindclaw, Hind claw
2) Indexed a word  -  "Hindclaw"

3) In analysis page, searched this word. BODY(field name):Hindclaw
 4) Output obtained for "Hindclaw" is  Hindclaw, Hind and claw.
It separated based on white space as well. Note: I have not used white space
tokenizer for this data type.

What is the error?

Thanks and Regards,
Rajani Maski

Re: Facing problem with white space in synonyms

Posted by lboutros <bo...@gmail.com>.
coud you try to escape white spaces like this:

Hind\ claw

Ludovic.

-----
Jouve
France.
--
View this message in context: http://lucene.472066.n3.nabble.com/Facing-problem-with-white-space-in-synonyms-tp2870193p2870552.html
Sent from the Solr - User mailing list archive at Nabble.com.