开发者

Solr RandomSortField is generating inconsistent results for same random seed

开发者 https://www.devze.com 2023-04-12 22:55 出处:网络
I have 开发者_如何学JAVAthis solr field: <fieldType name=\"random\" class=\"solr.RandomSortField\" indexed=\"true\" />

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.

0

精彩评论

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