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

Ryan McKinley commented on SOLR-264:
------------------------------------

> 
> Rather than mess with query parsing to hack in support for a "random" key 
> word, a more elegant way would be to create a RandomFieldType specifically 
> for sorting, then hook it in via the schema in the normal manner.
>

That sounds good -- then you don't run the risk of namespace overlap.  The 
special keyword 'score' already makes me a bit nervous.  It seems like you 
could make a field named score, but could not sort by it and could not refer to 
it (except as *)

 
> Since this is such a unique requirement (probably not broadly applicable)

Is it so unique?  In 'full text search' sure, but if the domain is 'database' 
it seems pretty fundamental.  I can't be the only person who wants to do:

 SELECT * FROM features ORDER BY rand();

 fq=feature:true&sort=random

> 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: 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