2014-01-08 2 views
0

Solr suggester 모듈을 설정하려고합니다.Solr - 질문이 없습니다.

내가 같은 guide 및 설정 내 핵심 따랐습니다

:

solrconfig.xml

<searchComponent class="solr.SpellCheckComponent" name="suggest"> 
    <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">city</str> <!-- the indexed field to derive suggestions from --> 
     <float name="threshold">0</float> 
     <str name="buildOnCommit">true</str> 
    </lst> 
</searchComponent> 

<requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/suggest"> 
    <lst name="defaults"> 
     <str name="spellcheck">true</str> 
     <str name="spellcheck.dictionary">suggest</str> 
     <str name="spellcheck.onlyMorePopular">false</str> 
     <str name="spellcheck.count">5</str> 
     <str name="spellcheck.collate">true</str> 
    </lst> 
    <arr name="components"> 
     <str>suggest</str> 
    </arr> 
</requestHandler> 

의 schema.xml

<types> 

    <fieldType class="solr.TextField" name="textSpell" positionIncrementGap="100"> 
    <analyzer> 
     <tokenizer class="solr.StandardTokenizerFactory"/> 
     <filter class="solr.StandardFilterFactory"/> 
     <filter class="solr.LowerCaseFilterFactory"/> 
    </analyzer> 
    </fieldType> 

    </types> 

    <fields> 
     <!-- my other fieldsfields --> 

     <field name="city" type="textSpell" indexed="true" stored="true"/> 
    </fields> 

다음과 함께 맞춤법 검사를 재 구축

http://localhost:4569/solr/myCore/suggest?q=a&spellcheck=true&spellcheck.build=true 

한 다음 검색을 수행

http://localhost:4569/solr/myCore/suggest?q=aberdean&spellcheck=true&spellcheck=on 

하지만 난 항상 응답에 빈 제안 얻을 : 내가 제안 in this question

아니에요 왜 어떤 생각을 확인했습니다

<response> 
    <lst name="responseHeader"> 
     <int name="status">0</int> 
     <int name="QTime">1</int> 
    </lst> 
    <lst name="spellcheck"> 
    <lst name="suggestions"/> 
    </lst> 
</response> 

을 결과를 얻고 있습니까?

답변

0

을 수행하고 쿼리를 수행 할 수 있습니까? 나는 그것 때문이라고 생각한다.

<str name="buildOnCommit">true</str> 

다시 허위로 만들 수 있습니까?