Complex queries in CouchDB across multiple documents

by nute   Last Updated June 13, 2019 07:06 AM

I'm relatively new to CouchDB (more specifically Cloudant if it matters) and I'm having a hard time wrapping my head around something.

Assume the following (simplified) document examples:

{ "docType": "school", "_id": "school1", "state": "CA" }
{ "docType": "teacher", "_id": "teacher1", "age": "40", "school": "school1" }

I want to find all the teachers aged 40 in California.

Maybe my mind is still stuck on SQL world, but I'm having a hard time understanding how to run a query that uses data from different documents...

PS. let me know if this is more suited to StackOverflow...

Tags : join query couchdb

Related Questions

Updated September 01, 2018 15:06 PM

Updated August 02, 2018 17:06 PM

Updated April 08, 2015 18:02 PM

Updated August 24, 2017 08:06 AM

Updated March 08, 2018 00:06 AM