多个 solr 服务器实例上的 solr.RandomSortField [英] solr.RandomSortField on multiple solr server instances
问题描述
这里有一个 solr 问题,我有多个 solr 服务器实例,它们都有相同的数据和架构,架构包含一个动态字段,它是 solr.RandomSortField
,所以我想知道我是否运行 sort=rand_1234%20desc
在不同的 solr 服务器上,我想得到相同的结果吗?
Got a solr question here, I have multiple solr server instances they all the same data and schema, the schema contains a dynamic field which is solr.RandomSortField
, so I am wondering if I run sort=rand_1234%20desc
on different solr servers, am I suppose to get the same result?
推荐答案
根据RandomSortField的源码,种子中包含索引的版本号.这意味着,如果您在不同的服务器上使用相同的随机参数(例如sort=random_1234")进行搜索,如果索引相等(相同的内容)并且具有相同的版本 ID(通过复制),则返回相同的结果.
According to the source code of RandomSortField, the seed includes the version number of the index. This means that if you issue a search with the same random parameter (e.g. "sort=random_1234") on different servers the same result is returned if the indexes are equal (same content) and have the same version id (via replication).
您可以在每台服务器的/admin/ui 中查看索引的版本.
You can check the version of the indexes in the /admin/ ui of every server.
这篇关于多个 solr 服务器实例上的 solr.RandomSortField的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!