February 2015
Intermediate to advanced
170 pages
3h 39m
English
We've already seen how Couchbase handles primary indexes for documents. The key in the key/value pair is the unique primary key for a document. Using the key/value API, documents may be retrieved only by this key. While this might seem limiting, there are key/value schema design patterns that help to provide flexibility. We'll explore them in Chapter 5, Introducing N1QL.
Fortunately, Couchbase as a document store provides a much more powerful approach for finding your documents. To illustrate the problem and the solution, we'll walk through a brief example. Imagine having a simple JSON document such as this:
{
"Username": "jsmith",
"Email": "jsmith@somedomain.com"
}The key/value limitation is easy to see. Imagine we want to find ...
Read now
Unlock full access