Hi Klein, 
Thanks for your reply. But i tried some suggestion with solr, and results
return is good. But i want to using search component with solr 3.1. Now i
have had some problems with Suggester. i think my problem perhaps about in
schema file. This is schema file: 

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
                <analyzer type="index">
                        <charFilter class="solr.HTMLStripCharFilterFactory"/>
                        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
                        <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" splitOnCaseChange="1"/>
                        <filter class="solr.LowerCaseFilterFactory"/>
                </analyzer>
                <analyzer type="query">
                        <charFilter class="solr.HTMLStripCharFilterFactory"/>
                        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                        <filter class="solr.SynonymFilterFactory" 
synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
                        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
                        <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnCaseChange="1"/>
                        <filter class="solr.LowerCaseFilterFactory"/>
                </analyzer>
</fieldType>

And i defined fields: 
<field name="s_SongId" type="string" indexed="true" stored="true"/>
<field name="s_SongName" type="text" indexed="true" stored="true"/>
<field name="search_autocomplete" type="text_auto" indexed="true"
stored="true" multiValued="true"/>

where: 
fieldType with text_auto:
<fieldType class="solr.TextField" name="text_auto"
positionIncrementGap="100">
         <analyzer type="index">
                <tokenizer class="solr.KeywordTokenizerFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
         </analyzer>
         <analyzer type="query">
                <tokenizer class="solr.KeywordTokenizerFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
         </analyzer>
</fieldType>
In file solrconfig.xml i defined: 
<searchComponent name="spellcheck-autocomplete"
class="solr.SpellCheckComponent">
         <lst name="spellchecker">
          <str name="name">suggest</str>
          <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
          <str
name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
          <str name="field">search_autocomplete</str>
          <str name="buildOnCommit">true</str>
         </lst>
        </searchComponent>
  
  <requestHandler name="/autocomplete"
class="org.apache.solr.handler.component.SearchHandler">
        <lst name="defaults">
                <str name="spellcheck">true</str>
                <str name="spellcheck.dictionary">suggest</str>
                <str name="spellcheck.count">10</str>
                <str name="spellcheck.collate">true</str>
        </lst>
        <arr name="components">
                <str>spellcheck-autocomplete</str>
        </arr>
  </requestHandler>

Can any one help???

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Autocomplete-with-Solr-3-1-tp3202214p3204176.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to