how can i split couchbase document which exceeds 20MB of size? return message = ValueTooLarge, Success = false Couchbase 3.0.3 .net 4.5.1 C# -
document size having more 20mb physical size, number of characters> 22000000 please see below code
var jsondatarow = jsonconvert.serializexmlnode(objxml, newtonsoft.json.formatting.none, true); var document = new document<string> { id = "rr", content = jsondatarow }; var upsert = bucket.upsert(document);
you need create parent document holds keys child documents:
{ "id": "parent_doc_1", "children": [ "child_doc1", "child_doc2"] } the child docs stored separately:
{ "id": "child_doc1", "parent_id": "parent_doc_1" } and
{ "id": "child_doc2", "parent_id": "parent_doc_1" } then pull parent document , child keys (id) , fetch using bulk using sdk of choice. this:
var parent = await bucket.getasync<dynamic>("parent_doc_id"); if (parent.success) { var children = await bucket.getasync<dynamic>(parent.value.children); //do stuff } that's not real code, should able idea here.
Comments
Post a Comment