[ 
https://issues.apache.org/jira/browse/SOLR-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506316
 ] 

Hoss Man commented on SOLR-264:
-------------------------------

wow.

why is it whenever i read a patch from yonik that starts with a bunch of 
bitshift operators, i start to worry that in 7 days a weird girl is going to 
climb out of a well and then i'm going to die?

that's some freaky shit ... but i can't see anything wrong with the approach.  
(assuming the hash function does what it says it does)

in general, any approach that uses a fixed seed per SortComparatorSource should 
work, and getting the seed from the "filed name" seems like a slick way to do 
it ... we wouldn't even have to require that the field name match any sort of 
pattern (ie: end with _ and a number) we could just hash on the field name.

people could even choose to use a regular field (instead of a dynamic field) 
and accept that they'd get a fixed ordering per commit/> if we also used the 
IndexReader version in computing the seed.

> Support 'random' sort order
> ---------------------------
>
>                 Key: SOLR-264
>                 URL: https://issues.apache.org/jira/browse/SOLR-264
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Priority: Minor
>         Attachments: RandomSortField.java, SOLR-264-RandomSortOrder.patch, 
> SOLR-264-RandomSortOrder.patch, SOLR-264-RandomSortOrder.patch
>
>
> Support querying for random documents:
>   http://localhost:8983/solr/select/?q=*:*&fl=sku&sort=random%20desc

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to