Hello everyone,
I have a problem with updating my docs in the bucket. When I change something, like, add a new property to my docs such as “surname”: “blahblah”, it takes a very long time to update all the documents even though all it has to do is add a single line. Is it normal or am I doing something wrong? I’m using Upsert method to do so. What can I do to make it faster? This is my method :
public static void sendToCouchbase()
{
var newDoc = new Document<Forum>();
var documents = getTables();
var myBucket = myCluster.OpenBucket();
for (int i = 0; i < documents.Count; i++)
{
using (myBucket = myCluster.OpenBucket())
{
newDoc.Content = documents[i];
newDoc.Id = documents[i].Type + "_" + documents[i].Id;
var result = myBucket.Upsert(newDoc);
}
}
}
Thanks.