0

I wonder why I got an exception telling me 'cursor not found'. I have 5 million data in the server, i have my program to fetch all those but it stops after hours parsing those and getting eans in the loop.

var libris = LibriCollection.FindAll().SetFields("doc.product.productidentifier");
            List<string> eans = new List<string>();
            foreach (var product in libris)
            {

                eans.Add(product.doc["product"]["productidentifier"]["b244"].AsString;
            }
Wylan Osorio
  • 1,136
  • 5
  • 19
  • 46

1 Answers1

0

You need to disable to cursor timeout.

cursor.SetFlags(QueryFlags.NoCursorTimeout);
etr
  • 1,252
  • 2
  • 8
  • 15