Hi Anand,
Try this
View:
function(doc) {
emit([doc['type'], doc['publisher'], doc['author']] null);
}
Query:
../view_name?key=["book", "penguin", "Rowling"]
Regards
Adam
2009/3/13 Anand Chitipothu <[email protected]>:
> Hi,
>
> I have been reading about couchdb and trying understand how it works.
> One thing that i'm unable to understand is how to do equivalent of
> JOINs in couchdb.
>
> Let me explain what I need with an example.
> I want to store books in couchdb with each book having title, authors,
> isbn, lccn, publisher and many other fields.
> I would like to be able to query the system for any combination of
> these. some thing like:
>
> type="book" and publisher="foo" and author="bar
> type="book" and isbn="1234567890"
>
> How to do this in couchdb?
> I wouldn't want to create a temporary view for running each query as
> it is very expensive.
>
> Thanks,
> Anand
>