Solr MoreLike这不适用于多个分片吗?

编程入门 行业动态 更新时间:2024-10-24 22:29:31
本文介绍了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

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

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

给出结果,

我什至尝试将其指定为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这不适用于多个分片吗?

本文发布于:2023-11-28 15:41:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643001.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   适用于   这不   分片   Solr

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!