Я использую Solr 5.2 и я хочу использовать IndexBasedSpellChecker внутри моего searchHandler, и это мой searchcomponent для IndexBasedSpellChecker:Как настроить IndexBasedSpellChecker в solr?
<searchComponent class="solr.SpellCheckComponent" name="spellcheck">
<str name="queryAnalyzerFieldType">text_en_general</str>
<lst name="spellchecker">
<str name="name">default</str>
<!--specify a field to use for the suggestions-->
<str name="field">body-en</str>
<str name="classname">solr.IndexBasedSpellChecker</str>
<!-- <str name="distanceMeasure">internal</str> -->
<!--The accuracy setting defines the threshold for a valid suggestion-->
<!-- <float name="accuracy">0.05</float> -->
<!-- maxEdits defines the number of changes to the term to allow-->
<int name="maxEdits">2</int>
<!--defines the minimum number of characters the terms should share-->
<int name="minPrefix">1</int>
<!--defines the maximum number of possible matches to review before returning results-->
<int name="maxInspections">5</int>
<!--defines how many characters must be in the query before suggestions are provided-->
<int name="minQueryLength">4</int>
<!-- sets the maximum threshold for the number of documents a term must appear in before being considered as a suggestion-->
<float name="maxQueryFrequency">0.01</float>
<!--sets the minimum number of documents a term must appear in-->
<float name="thresholdTokenFrequency">.01</float>
моя проблема в том, что когда я хочу используйте эту погрешность
Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot be cast to java.lang.String
, и когда я прокомментирую эту настройку, она даст мне Другая ошибка для использования distanceMeasure:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'internal'
и когда я Coment их обоих, я не могу получить результат от моего спеллчекер, и когда я запрашиваю фразу он просто орфографии в первое слово фразы, какие Я должен делать?