incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: erlang views
Date Thu, 27 Jan 2011 17:27:53 GMT
No, you can't do that. It's not a language limitation. A b+tree
supports efficient key look up. It's also efficient to find the
previous and next key when you do so. So couchdb provides contiguous
range queries too. Your query can only be completed by a different,
and more complicated, data structure than couchdb actually supplies.


On Thu, Jan 27, 2011 at 5:21 PM, Kenneth Tyler <> wrote:
> If i want to select documents by values in certain parts of a key and ignore
> other parts I don't think I can do that in couch using javascript views.
> If i have keys: a,3,b,4 -- a,2,c,1 -- a,5,b,2
> and i want to return keys that match a, _ , b, _  (where _ means "i don't
> care")
> can i do that if i switch to writing the views in erlang ?
> i know i could deal with this by writing a new view, whose key was made up
> of the 1 and 3rd place values,
> but what i want is a way to return rows from a view that contains the full
> key by pattern matching
> thanks
> ken tyler

View raw message