Have a look at my blog post 
http://www.cominvent.com/2012/01/25/super-flexible-autocomplete-with-solr/ for 
a walkthrough of how it could be done, as a separate Solr core.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 1. aug. 2012, at 12:04, aniljayanti wrote:

> I want to implement an auto completion search with solr using NGrams. If the
> user is searching for names of employees, then auto completion should be
> applied. ie., 
> 
> if types "j" then need to show the names starts with "j" if types "ja" then
> need to show the names starts with "ja" if types "jac" then need to show the
> names starts with "jak" if types "jack" then need to show the names starts
> with "jack"
> 
> Below is my configuration settings in schema.xml, Please suggest me if
> anything wrong.
> 
> below is my code in schema.xml
> 
> <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="15" /> 
>  </analyzer>
> <analyzer type="query">
>  <tokenizer class="solr.KeywordTokenizerFactory" /> 
>  <filter class="solr.LowerCaseFilterFactory" /> 
>  </analyzer>
>  </fieldType>
> <field name="empname" type="edgytext" indexed="true" stored="true" />
> <field name="autocomplete_text" type="edgytext" indexed="true" stored="true"
> omitNorms="true" omitTermFreqAndPositions="true" /> 
> <copyField source="empname" dest="text" /> 
> 
> when im searching with name "mado" or "madonna" getting employees names.But
> when searching with "madon" not getting any data.
> 
> Please help me on this.
> 
> 
> Thanks in Advance,
> 
> Anil.
> 
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to