I am trying to add 11 million records through SOLR. But am getting System.OutOfMemory exception.
I am doing in chunk of 2000 records. For 12000 records its taking 10 minutes to commit and finally getting the above exception.
splitSolrList - Collection another list contains 2000 records.
Parallel.ForEach(splitSolrList, solrList =>
{
var solr = ServiceLocator.Current.GetInstance<ISolrOperations<SolrProduct>>();
solr.AddRange(solrList);
solr.Commit();
});
How to resolve this?