Hi,

I am using solr 3.3 with SolrJ. I am trying to use EdgeNgram to power auto
suggest feature in my application. My understanding is that using EdgeNgram
would mean that results will only be returned for records starting with the
search criteria but this is not happening for me.

For example if i search for "tr", i get results as following:

Greenham Trading 6
IT Training Publications
AA Training

Below are details of my configuration:

<fieldType name="edgytext" class="solr.TextField"
positionIncrementGap="100">
  <analyzer type="index">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
maxGramSize="15" />
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
  </analyzer>
</fieldType>

<field name="businessName" type="edgytext" indexed="true" stored="true"
required="true" omitNorms="true" omitTermFreqAndPositions="true" />

Any ideas why this is happening will be much appreciated.

Thanks.

Reply via email to