0

I am using couch-db. I have write views which match only use single condition and just wondering how to write views in couch-db futon which returns the results by matching more than one conditions. e.g:I have some documents with attributes of title,author,subject and language in the database.I want to get those documents which contains the author == 'Shakespeare' AND language == 'English'. Is it possible to do that? As we use "where clause" in SQL like: where this && that, can we implement something like that in here? Your feedback will be very helpful. Thanks.

  • This may help: http://stackoverflow.com/questions/28339910/how-can-i-use-my-sql-knowledge-with-cloudant-couchdb – Chris Snow Jun 30 '15 at 11:24
  • I see this link http://stackoverflow.com/questions/28345751/how-to-create-a-view-in-couchdb-with-multiple-where-and-or-clauses.But it is implementing some hard coded values like if this == 'Y'. In my case I am sending a search string as input(It depends upon the user what he selected or write to search), so how can I check that value? For example the search string == "Shakespeare English" and I want to get the docs matching the values in the search string not the hard coded values,How is it possible to check that in couchdb. – MUHAMMAD WAQAS Jul 01 '15 at 07:41
  • One more thing,is it possible to access the query string in the couchdb views..As in the above example it is "Shakespeare English" can I access it for applying some splitting or like so. – MUHAMMAD WAQAS Jul 01 '15 at 08:59

0 Answers0