solr.RandomSortField on multiple solr server instances
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
精彩评论