Should I be using multiple buckets?


#1

I watched the Nickel webinar today. All examples, tutorials, and documentation are using multiple buckets, are multiple buckets the preferred way?

I had read other Couchbase documentation that advocated using as few possible buckets & views.

Please clarify.


#2

N1QL should not change how you model your data and buckets. If you use a small number of buckets with a type field in your documents, you can include the type field in your view indexes and N1QL queries.

One important thing is to make sure your view indexes support the queries you wish to run. You can use N1QL’s CREATE INDEX statement to automatically create a view index with the fields you wish to filter on.