Solr MoreLike这不适用于多个分片吗? [英] Solr MoreLikeThis not working for multiple shards?

查看:156
本文介绍了Solr MoreLike这不适用于多个分片吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have 5 node cluster in SolrCloud, with 2 shards per node,

Solr版本:6.3.0

Solr version:6.3.0

现在,当我运行mlt查询时,它仅返回每个节点的结果,而不是将其分配到所有分片/节点上,即

now when I run mlt query it only returns result per node and doesn't distribute them over all shards/nodes, i.e

给出结果,

我什至尝试将其指定为param:

I have even tried specifying this as param:

碎片= 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_shard8_res /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.207:3898. /solr/test_ingest_shard4_replica1

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以运行分布式搜索? 谢谢

How do I configure mlt to run a distributed search? Thanks

推荐答案

据我所知,此处理程序仅是单个分片,因此它将仅考虑本地分片中可用的文档.

The More Like This Handler is, as far as I know, single shard only, so it'll only consider the documents available in the local shard.

更像此查询解析器但是请提及它支持Solr Cloud,因此请尝试使用它.

The More Like This Query Parser do however mention that it is Solr Cloud-aware, so try using that instead.

MLTQParser可以检索与给定文档相似的文档.它使用Lucene现有的MoreLikeThis逻辑,并且还可以在SolrCloud模式下工作.此处使用的文档标识符是唯一ID值,而不是Lucene内部文档ID.返回的文档列表不包括查询的文档.

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.

查找诸如id = 1的文档之类的文档,并使用名称字段进行相似性查找.

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

{!mlt qf=name}1

使用mintf和mindf在符合条件的条件上添加更多约束.

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

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

这篇关于Solr MoreLike这不适用于多个分片吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆