lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Lamb <brian.l...@journalexperts.com>
Subject Autocomplete
Date Thu, 01 Sep 2011 15:27:44 GMT
Hi all,

I've read numerous guides on how to set up autocomplete on solr and it works
great the way I have it now. However, my only complaint is that it only
matches the beginning of the word. For example, if I try to autocomplete
"dober", I would only get, "Doberman", "Doberman Pincher" but not "Pincher,
Doberman". Here is how my schema is configured:

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

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

How can I update my autocomplete so that it will match the middle of a word
as well as the beginning of the word?

Thanks,

Brian Lamb

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