SaaS CMS has officially launched! Learn more now.

Find Commerce and service api


Updating a product with meta data, prices and node relations means minimum of 3 calls to the service api since prices and relations are handled in separate calls.
Is there any way to "postpone" the indexing of the product? I want Find to re-index the product, but after prices and relations are updated.

One option is to use custom conventions and a flag that indicates if the item should be re-indexed, but that means an extra call. Something like this:

1. Post entry (with flag false)
2. Post nodeentryrelations
3. Post prices 
4. Post entry (wtih flag true)

Or is there a better way? I'm open for suggestions :)

Feb 16, 2017 8:14

IIRC, or at least with an older version of Find, the queue of content indexing is processed every 5 seconds. So if you update your entry fast enough, it should be one index after all. I'm not sure if that is changed, or if the queue time is configurable now. However I think it still works that way.

Feb 16, 2017 9:20

Can someone from the Find team provide some inside on this? What is default queue time? And is this configurable?

Feb 16, 2017 10:21

Hi Mari, sorry for late reply.

Quan is right, the queue will run every 5 second. It's not possible to change this setting right now, but we have a task for it. One thing that can be set is the indexing queue batch size, EventedIndexingSettings.Instance.IndexingQueueBatchSize. This setting will determine how many items to receive from the queue, before sending a batch for indexing. This setting isn't what you are looking for, but it will help.

We will not store same item twice in the queue. If the queue hasn't been executed between the events (content event, price event etz), then you will only have one index-call for the content to Find.

One other thing that can be good to know. The queue will only run if the scheduled queue is enabled (EventedIndexingSettings.Instance.ScheduledPageQueueEnabled) and the database isn't in read only mode (EventedIndexingSettings.Instance.IsDatabaseReadOnly).

There is also a possibility to create your own implementation of the queue (or modify the queue handler) by inheriting from EPiServer.Find.Cms.ContentChangedEventStore. You might want to hold some form of state of the items, to make sure those are not put in the index twice between those events.

Edited, Mar 14, 2017 8:38
* 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.