That is right, on Couchbase buckets a document is limited to 20M.
You want to split it up manually if it gets larger. That said, what about doing something more “intelligent” at the application side and do documents based on something different like every day/hour/second whatever fits? With views, it doesn’t make a difference anyways when you are loading it.
Depending on the SDK you are using, you are getting a different error type (exception, error) ,but yes the server will refuse if you store a document larger than 20 megs.
A key is a string that you select, up to 250 chars. It should be large enough so you can build patterns which you can quickly use to lookup.
let’s say you want to do group it per day per sensor: sensor1-20141027-1
the last -N you can use in your application to create more docs per day if there is a need for it. Again, your app needs to handle it, but if you follow such a pattern (which is a very common key lookup pattern in Couchbase and very performant) you can also quickly build up those keys on querying. For example if you want data for sensor X on 10 different days you just load 10 docs and you can build the keys from your SDK since you know how they look.
Hi, no there is no way to do something like this in couchbase. Every document is treated the same, persisted and replicated - regardless of the size. If you want more logic you need to implement that on the application side
Repeatedly updating a large document will be inefficient — you’ll have to keep sending the entire document to the server every time you call Set, so the data traffic will keep growing. It’s better to use many small documents. You can then use a view to collect all the data in one call.