couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksey Kluchnikov <al...@ximad.com>
Subject Re: request with OR conditions
Date Sat, 08 Dec 2012 09:17:38 GMT
* Keith Gable <ziggy@ignition-project.com> [2012-12-07 18:42:30 -0600]:

AND part as discribed in 
http://wiki.apache.org/couchdb/HTTP_view_API
via keys array or via json in POST
{"keys": ["key1", "key2", ...]}.

Question is how to do OR part?

> I would be curious how you're doing the "AND" part. If you're querying the
> view with multiple keys, you could look into keys that are arrays and see
> if that works for you.
> On Dec 7, 2012 12:39 AM, "Aleksey Kluchnikov" <alexs@ximad.com> wrote:
> 
> >
> > Hi all.
> >
> > I need choose database for new project.
> > CouchDB is works for me.
> >
> > But i need a functionality of OR in search requests.
> >
> > Like in sql:
> > where
> > (tag1 = val1 OR tag1 = default) AND
> > (tag2 = val2 OR tag2 = default) AND
> > (tag3 = val3 OR tag3 = default) AND
> > (tag4 = val4 OR tag4 = default) ...
> >
> >
> > Is it possible with CouchDB?
> >
> >
> > --
> > Aleksey Kluchnikov
> >

-- 
Aleksey Kluchnikov,
XiMAD server side engineer (Ulyanovsk)
Email/Jabber: alexey.kluchnikov<at>ximad.com
Skype: kluchnikov<dot>aleksey

Mime
View raw message