lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shubham Srivastava <Shubham.Srivast...@makemytrip.com>
Subject Searching on fields with White Spaces
Date Tue, 24 Apr 2012 12:39:58 GMT
I have a custom fieldtype with the below config

<fieldType name="text_ngram" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"
enablePositionIncrements="true" />
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="10" />
<filter class="solr.PhoneticFilterFactory" encoder="DoubleMetaphone" inject="true"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="10" />
      </analyzer>
    </fieldType>


I have an Autocomplete configured on the same field which gives me result as expected. A new
use case is to search kualalumpur or say newyork with out spaces returning Kuala Lumpur and
New York which happen to be the original values.

What should be the recommended solution.

Regards,
Shubham



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message