Custom object index to find service

Vote:
 

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));
}

}

}

#227525
Sep 07, 2020 6:29
Vote:
 

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.

#227583
Sep 08, 2020 10:51
Vote:
 

Hi Tomas,

Thanks for the update.

#227606
Sep 08, 2020 16:04
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.