SaaS CMS has officially launched! Learn more now.
AI OnAI Off
SaaS CMS has officially launched! Learn more now.
Each batch of data indexed should not exceed 10 MB. As long as you are well below 10 MB, I guess 1000 records at a time should be fine.
Hi Team,
As per my requirement, I am indexing custom objects into EpiServer find.
So here, I am indexing 50 records at a time. My question is, what is the best practice to index max objects at a time. Do we get any issues if we index more multile objects at a time?
private readonly IClient _client;
public void GetDataToRebuildIndex()
{
var list = _findRepository.GetDataToRebuildIndex();
int totalRecords = list != null ? list.Count() : 0;
if (totalRecords > 0)
{
int indexPageSize = 50;
int pageNumbers = Convert.ToInt32(Math.Ceiling(totalRecords / Convert.ToDouble(indexPageSize)));
for (int i = 0; i < pageNumbers; i++)
{
_client.Index(list.Skip(i * indexPageSize).Take(indexPageSize));
}
}
}