You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Mickael Bailly (JIRA)" <ji...@apache.org> on 2013/07/03 09:36:24 UTC

[jira] [Updated] (COUCHDB-812) implement randomization in views resultset

     [ https://issues.apache.org/jira/browse/COUCHDB-812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mickael Bailly updated COUCHDB-812:
-----------------------------------

    Labels: merge rcouch  (was: )
    
> implement randomization in views resultset
> ------------------------------------------
>
>                 Key: COUCHDB-812
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-812
>             Project: CouchDB
>          Issue Type: Wish
>          Components: Database Core
>    Affects Versions: 0.11
>         Environment: CouchDB
>            Reporter: Mickael Bailly
>            Priority: Minor
>              Labels: merge, rcouch
>
> This is a proposal for a new feature in CouchDB : allow a randomization of rows in a view response. We can for example add a randomize query parameter...
> This request would probably not return the same results for the same request.
> As an example :
> GET /db/_design/doc/_view/example :
> {
>   ..
>   rows: [
>     {key: 1 ...},
>     {key: 2 ...},
>     {key: 3 ...}
>   ]
> }
> GET /db/_design/doc/_view/example?randomize=true :
> {
>   ..
>   rows: [
>     {key: 2 ...},
>     {key: 3 ...},
>     {key: 1 ...}
>   ]
> }
> GET /db/_design/doc/_view/example?randomize=true :
> {
>   ..
>   rows: [
>     {key: 1 ...},
>     {key: 3 ...},
>     {key: 2 ...}
>   ]
> }
> This is a feature hard to implement client-side (but by reading all doc ids and use client-side random function). It's implemented by the RDBMS from ages, probably for the very same reasons : if we should read all the rows client-side to random-select some of them, performances are awful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira