Solr suggester in SolrCloud mode

前端 未结 1 1859
故里飘歌
故里飘歌 2021-01-16 14:54

I am running the solr in CloudSolr mode with three shards. The data is already indexed into solr. Now I have configured the solr suggester in solrconfig.xml. This is the con

相关标签:
1条回答
  • 2021-01-16 15:17

    It was not working because solr was running in SolrCloud mode. There is two ways to perform suggestion in solrCloud mode:

    • Use the distrib=false parameter. This will fetch the data from only one shard which you are accessing in the command. You can add the following into Component definition itself.

        <bool name="distrib">false</bool> 
      
    • Use the shards and shards.qt parameter for searching all the shards. The shards parameter will contain comma separated list of all the shards which you want to include in the query. The shards.qt parameter will define the reat API you want to access.

    shards.qt: Signals Solr that requests to shards should be sent to a request handler given by this parameter. Use shards.qt=/spell when making the request if your request handler is "/spell".

    shards: shards=solr-shard1:8983/solr,solr-shard2:8983/solr Distributed Search

    Please check Here for more details.

    0 讨论(0)
提交回复
热议问题