2017-09-14 5 views
0

solr에 통합 된 맞춤법 검사기에 문제가 있습니다. 동일한 solrconfig.xml (맞춤법 검사기에 적합한 설정)과 약간 다른 XML (맞춤법 검사기에 대해 동일한 구성으로)으로 구성된 두 개의 코어가 있습니다 (현재).Solr spellcheckin randomly working

핵심은 맞춤법 검사기가 완벽하게 작동한다는 것입니다. Solr Admin에서 작동하지 않는 경우 "맞춤법"필드 (맞춤법 검사에서 사용하는 필드)가 인덱싱되었지만 저장되지 않은 것을 볼 수 있습니다.

아이디어가 있으십니까?

나는 내 것이 아니기 때문에 xml 파일을 게시 할 수 있다고 생각하지 않습니다.

감사합니다 모두

편집 :

Solrxml.conf

<requestHandler name="/select" class="solr.SearchHandler"> 
    ... 
    </requestHandler> 

    <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> 
    <lst name="spellchecker"> 
    <str name="classname">solr.IndexBasedSpellChecker</str> 
    <!-- field to use --> 
    <str name="field">spelling</str> 
    <!-- buildOnCommit|buildOnOptimize --> 
    <str name="buildOnCommit">true</str> 
    <!-- $solr.solr.home/data/spellchecker--> 
    <str name="spellcheckIndexDir">./spellchecker</str> 
    <str name="accuracy">0.7</str> 
    <float name="thresholdTokenFrequency">.0001</float> 
    </lst> 
</searchComponent> 

의 schema.xml

<schema name="docs" version="1.5"> 
... 
<field name="fooCore1"  type="text"    indexed="true" stored="true" multiValued="false" /> 

    <!-- Spellcheck --> 
    <field name="spelling"    type="text"    indexed="true" stored="true" multiValued="false" /> 
    <copyField source="fooCore1" dest="spelling" /> 
    ... 

    ... 
    <solrQueryParser defaultOperator="OR"/> 
</schema> 

의 schema.xml (작동하지 않는) (워킹)

<schema name="docs" version="1.5"> 
    ... 
     <field name="fooFoo"    type="text"    indexed="true" stored="true" multiValued="false" /> 
     <copyField source="fooFoo"  dest="fooCore" maxChars="300000" /> 
    <!-- Spellcheck --> 
    <field name="fooCore2"    type="text"    indexed="true" stored="true" multiValued="false" /> 
    <copyField source="fooCore2" dest="spelling" maxChars="300000" /> 
    ... 
    </schema> 

두 번째 스키마에있는 spelling을 제외한 모든 필드는 해당 값으로 저장되고 색인화됩니다.

제 3의 코어를 만들려고했으나 작동하지도 않았습니다.

+0

맞춤법 검사 색인을 다시 작성 했습니까? 맞춤법 검사기는 어떻게 구성되어 있습니까? – MatsLindh

+0

사전은'IndexBasedSpellChecker'이며, doc 커밋에 대한 업데이트가 있습니다. 맞춤법 검사 색인이 다시 작성됩니다 (Solr Admin의 쿼리를 통해). 심지어 새로운 코어로 시도했지만 동일한 문제가 있습니다. 두 스키마의 유일한 차이점은'copyField' 속성이 소스로 작동하지 않는 것입니다. 추신 : 러닝 솔레 5.4.1 – Ghesio

+0

대기 - copyfield 속성을 소스로 사용 하시겠습니까? 그 필드에 아무것도 삽입되지 않았습니까? 그것이 건설중인 분야를 검색 할 수 있습니까? 두 필드는 어떻게 정의되어 있습니까? – MatsLindh

답변

0

copyFieldcopyField의 소스가 될 수없는 것 같습니다.

잘못된 스키마에 대해 소스를 copyfield에서 field으로 변경했으며 문제가 해결되었습니다.