lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Klose ...@shi-gmbh.com>
Subject AW: auto completion search with solr using NGrams in SOLR
Date Wed, 01 Aug 2012 12:33:06 GMT
Your configuration of the fieldtype looks quite ok.

In what field are you searching? "text"? " empname " ? "autocomplete_text"?
If you are searching in "autocomplete_text " how do you add content to it? Is there another
copyfield statement? If you are searching in "text" what fieldtype has that field.

You can use the analysis.jsp (linked at the admin console) to check what happens with your
content at index time and search time and if there is a match.

Viele Grüße aus Augsburg

Markus Klose
SHI Elektronische Medien GmbH 
 

-----Ursprüngliche Nachricht-----
Von: aniljayanti [mailto:anil.jayanti@gmail.com] 
Gesendet: Mittwoch, 1. August 2012 12:05
An: solr-user@lucene.apache.org
Betreff: auto completion search with solr using NGrams in SOLR

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.

Mime
View raw message