Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
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));
}
}
}