我正在使用SOLR来生成建议。我给了一个名为length(tfloat)的float字段作为solrconfig.xml中的weightField。但在我的建议中,这个值没有出现在建议响应中,并显示为零。我期望建议按重量和重量排序,以保持长度值,表示建议的字符串长度。我正在使用solr 6.2.1
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>
<str name="indexPath">suggester_infix_dir</str>
<str name="payloadField">payload</str>
<str name="weightField">lengthval</str>-->
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">value</str>
<str name="suggestAnalyzerFieldType">text_general</str>
<str name="buildOnStartup">true</str>
<str name="buildOnCommit">true</str>
<str name="highlight">false</str>
<requestHandler name="/suggesthandler" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.count">900</str>
<str name="suggest.dictionary">mySuggester</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
答案 0 :(得分:0)
您好,它开始工作,不知道出了什么问题