Solr MoreLikeThis 不适用于多个分片?

Solr MoreLikeThis not working for multiple shards?

我在 SolrCloud 中有 5 个节点集群,每个节点有 2 个分片,

Solr version:6.3.0

现在,当我 运行 mlt 查询时,每个节点仅 returns 结果,并且不会将它们分布到所有 shards/nodes,即

http://10.0.1.15:8983/solr/test_ingest/mlt?q=advertising_id%w72w9424620427042&fl=score&fl=advertising_id&mlt.fl=channel_name&mlt.fl=show_name&mlt.fl=language&mlt.mindf=1

没有结果而

http://10.0.1.119:8983/solr/test_ingest/mlt?q=advertising_id%w72w9424620427042&fl=score&fl=advertising_id&mlt.fl=channel_name&mlt.fl=show_name&mlt.fl=language&mlt.mindf=1

给出结果,

我什至尝试将其指定为参数:

shards=10.0.1.84:8983/solr/test_ingest_shard3_replica1,10.0.1.84:8983/solr/test_ingest_shard8_replica1,10.0.1.206:8983/solr/test_ingest_shard2_replica1,10.0.1.206:8983/solr/test_ingest_shard7_replica1,10.0.1.15:8983/solr/test_ingest_shard5_replica1,10.0.1.15:8983/solr/test_ingest_shard10_replica1,10.0.1.207:8983/solr/test_ingest_shard1_replica1,10.0.1.207:8983/solr/test_ingest_shard6_replica1,10.0.1.119:8983/solr/test_ingest_shard9_replica1,10.0.1.119:8983/solr/test_ingest_shard4_replica1

我的请求处理程序:

 <requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
 </requestHandler>

如何将 mlt 配置为 运行 分布式搜索? 谢谢

据我所知,More Like This Handler 仅适用于单个分片,因此它只会考虑本地分片中可用的文档。

More Like This Query Parser 不过提到它是 Solr 云感知的,所以请尝试使用它。

MLTQParser enables retrieving documents that are similar to a given document. It uses Lucene's existing MoreLikeThis logic and also works in SolrCloud mode. The document identifier used here is the unique id value and not the Lucene internal document id. The list of returned documents excludes the queried document.

Find documents like the document with id=1 and using the name field for similarity.

{!mlt qf=name}1

Adding more constraints to what qualifies as similar using mintf and mindf.

{!mlt qf=name mintf=2 mindf=3}1