Unfortunately Solr and Lucene do not provide a truly clean out of the box solution for this obvious use case, but you can approximate it by using index-time synonyms, so that "mac book" will also index as "macbook" and "macbook" will also index as "mac book". Your SYNONYMS.TXT file would contain:

macbook,mac book

Only use the synonyms filter at index time. The standard query parsers don't support phrases for synonyms.

-- Jack Krupansky

-----Original Message----- From: rachun
Sent: Monday, May 26, 2014 5:26 AM
To: solr-user@lucene.apache.org
Subject: about analyzer and tokenizer

Dear all,


How can I do this...
I index the document  => Macbook
then when I query mac book I should get the result.

This is my schema setting...

<fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">
     <analyzer>
       <tokenizer class="solr.StandardTokenizerFactory"/>
       <filter class="solr.ThaiWordFilterFactory"/>
       <filter class="solr.LowerCaseFilterFactory"/>
       <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
       <filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/stopwords_th.txt"/>
     </analyzer>
</fieldType>

Any suggest would be very appreciate.
Chun.




--
View this message in context: http://lucene.472066.n3.nabble.com/about-analyzer-and-tokenizer-tp4138129.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to