Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache Solr-建议者不返回任何建议_Apache_Solr_Lucene - Fatal编程技术网

Apache Solr-建议者不返回任何建议

Apache Solr-建议者不返回任何建议,apache,solr,lucene,Apache,Solr,Lucene,我正在尝试设置模块 我已经按照以下步骤设置了我的核心: solrconfig.xml <searchComponent class="solr.SpellCheckComponent" name="suggest"> <lst name="spellchecker"> <str name="name">suggest</str> <str name="classname">org.apache.solr.s

我正在尝试设置模块

我已经按照以下步骤设置了我的核心:

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>
然后进行搜索:

http://localhost:4569/solr/myCore/suggest?q=aberdean&spellcheck=true&spellcheck=on
但我总是在回复中得到一个空洞的建议:

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

0
1.
我已经检查过这些建议了


知道我为什么没有得到结果吗

您能提交并尝试您的查询吗?我想这是因为

<str name="buildOnCommit">true</str>
true
你能再试一次吗

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