开发者

solr.RandomSortField on multiple solr server instances

开发者 https://www.devze.com 2023-02-02 05:29 出处:网络
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=ra

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 ge开发者_JAVA技巧t the same result?


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).

You can check the version of the indexes in the /admin/ ui of every server.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.solr/solr-core/3.5.0/org/apache/solr/schema/RandomSortField.java

0

精彩评论

暂无评论...
验证码 换一张
取 消