incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nils Breunese (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-415) View sorting
Date Wed, 19 Aug 2009 11:18:15 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745003#action_12745003
] 

Nils Breunese commented on COUCHDB-415:
---------------------------------------

Looks like couchdb-footrest (http://github.com/assembly/couchdb-footrest/tree) implements
this feature:

----
Order Docs By Value Fields

Ever need to order results by something other than the key you're segmenting the data with?
Footrest makes that easy too:

http://localhost:5984/loudly_dev/_footrest/_all_docs?startkey="00"&endkey="10"&order_by=["created_at","asc"]
----

> View sorting
> ------------
>
>                 Key: COUCHDB-415
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-415
>             Project: CouchDB
>          Issue Type: Wish
>    Affects Versions: 0.9
>            Reporter: Nils Breunese
>
> I'd like to be able to sort the output of a view. I have a view that generates a list
of event objects with start and end timestamps (and some other data). I emit this data using
the end timestamp as the key, because that is what I want to use for my ?startkey=... query.
But I'd like the results to be sorted by the start timestamp. I understand this is not currently
possible using regular CouchDB views.
> The CouchDB Users mailinglist suggested to use couchdb-lucene, as that does offer the
option to sort on any indexed field. I'm trying that route now, but it feels like overkill
to add a full-text indexer to CouchDB just to be able to sort the output of my view.
> Some soundbites from the IRC channel when I brought this up:
> ----
> <rnewson> breun: jan___: in this case the data to sort on is known at map time,
so an extension to emit to support multiple keys (with separate btrees) would do it. not sure
how much effort that is, though.
> <rnewson> sorting at query time feels infeasible.
> <jan____> rnewson: I think davisp had something like that working back in the day.
i.e. alternate sort oder. davisp?
> <rnewson> jan___: I missed that, but it sounds reasonable at emit time.
> <davisp> I think its this one: http://github.com/davisp/couchdb-old-patches/tree/view-sort
> ----
> I would love to have view sorting native in CouchDB.

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


Mime
View raw message