Solr建议者响应权重和有效负载为空

时间:2019-10-05 14:28:59

标签: solr

我在Solr中使用提示器。建议响应权重= 0,有效载荷为空,结果也重复。 http://localhost:8983/solr/mysql_core/suggest?suggest.q=ja 结果

{
"term": "<b>jack</b>et number 2",
"weight": 0,
"payload": ""
},
{
"term": "<b>jack</b>et",
"weight": 0,
"payload": ""
}

我该如何解决?

我的代码如下:

 <searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
      <str name="name">mySuggester</str>
      <str name="lookupImpl">BlendedInfixLookupFactory</str>
      <str name="indexPath">infix_suggestions</str>
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
      <str name="field">_text_</str>
      <str name="weightField">weight</str>
      <str name="suggestAnalyzerFieldType">text_general</str>
      <str name="buildOnStartup">false</str>
      <str name="buildOnCommit">false</str>
    </lst>
  </searchComponent>
  <requestHandler name="/suggest" class="solr.SearchHandler">
    <lst name="defaults">
      <str name="suggest.dictionary">mySuggester</str>
      <str name="suggest.onlyMorePopular">true</str>
      <str name="suggest">true</str>
      <str name="suggest.count">500</str>
      <str name="suggest.collate">true</str>
    </lst>
    <arr name="components">
      <str>suggest</str>
    </arr>
  </requestHandler>
<field name="name" type="string" indexed="true" stored="true"  multiValued="false"  />
    <field name="location" type="string" indexed="true" stored="true"  multiValued="false" />
    <field name="_text_" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="weight" type="pfloats" indexed="true" stored="true" />

   <copyField source="name" dest="_text_"/>
   <copyField source="location" dest="_text_"/>

我尝试使用BlendedInfixLookupFactory代替AnalyzingInfixLookupFactory,但是没有运气。

0 个答案:

没有答案