I have 开发者_如何学JAVAthis solr field:
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
<dynamicField name="random*" type="random" indexed="true" stored="true" />
I'm calling curl "http://localhost:8000/solr/product/select?q=tree&sort=random_4+desc" twice.
The two sets of returned results have a different ordering from each other. How can this be?
If you issue multiple queries with the same random parameter (sort=random_4+desc), the same result will only be returned if the query is issued against the same version of the index (same version id, same content).
If you've committed anything to your index, or your querying against multiple indexes due to replication or sharding, then you shouldn't see the same results.
精彩评论