Reputation: 186
I want to put 100k records in the particular index of the elastic client.
ElasticClientManager provides a function
public static IBulkResponse AddDocument<T>(List<T> itemList, string indexName, Func<T, string> fieldSelector) where T : class;
to insert bulk of items at once. But this method is taking 2 minutes for 4000 records. Is there any alternate way to do this in less time?
Upvotes: 1
Views: 329
Reputation: 821
• To improve performance, disable indexing when bulk loading data. Once the bulk loading operation is complete, re-enable the Bulk Index Tool and populate your indexes with the new data.
• If you plan to modify the default MIME file types for content indexing, follow the procedure outlined in Specify MIME Types for Content Indexing prior to running the Bulk Index Tool.
• If you are indexing large amounts of data comprised of content holder objects (such as documents), consider setting the wt.index.BulkIndexContentQueueList property. This property establishes separate indexing queues for content holder objects.
Upvotes: 1