incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <...@jsonified.com>
Subject Re: multiple keys query for a view with multiple key outputs
Date Mon, 11 Nov 2013 10:13:37 GMT


On 11. November 2013 at 10:01:53, bryan rasmussen (rasmussen.bryan@gmail.com) wrote:
>  
> Ok, well I can of course make a view that emits the ip and then do  
> keys=["18.72.0.3", " 617.253.1101"] etc. etc.
> But I also want to be able to sort by the timestamp in various ways.  
> How should I do that?
>  
>  
> Thanks

Hi Bryan,

Likely you will want to have a number of different views for these query types, as Jens suggests.

CouchDB is optimised for range queries, but you can also send multiple keys in a single request
using POST instead of GET https://couchdb.readthedocs.org/en/latest/api/ddoc/views.html?highlight=post%20query#post--db-_design-ddoc-_view-view

There are some space efficiencies for using multiple views within the same design doc, but
obviously you increase rebuild time & also the need to rebuild a view because of a change
to a different view within the same ddoc.

A+
Dave


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message