Heya!
I am nearly new to use elasticsearch, and I need to index aprox 80M
documents using the IndexManyAsync method, I am toward to batch the
documents, each will have 10000 docs and then add them to the index.
I read somewhere that I can do the indexing process on more than one
thread/parallel and even with more than one client, anyone could be able to
give me a rough idea in how to implement this in C#? I am using the .NET
API.
Below is a code snippet on what I've done so far, just as a test on
Adventure DB.
for (var i = 0; i < noOfBatches; i++)
{
noOfItemsToSkip = i * numberOfItemsToTake;
var contentToIndex =
contacts.Skip(noOfItemsToSkip).Take(numberOfItemsToTake);
bulkResponse =
client.IndexManyAsync(contentToIndex, "contactstore", "contact");
}
await bulkResponse;
I am pretty sure that I am doing something wrong with awaiting only the
last task, any insight on this one? and how can I use more than one client!
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.