Smart Search - Local index's not rebuilding automatically

Matthew King asked on April 25, 2022 16:42

Hi,

We are experiencing an issue where the Local index's of the Smart Search are not automatically rebuilding overnight even though they are set to.

Recent Answers


Brian McKeiver answered on April 25, 2022 23:59

Does the index rebuild correctly if you manually trigger it? If so, is your site "alive" overnight and responding to requests and are other scheduled tasks running over night ?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on April 26, 2022 06:52

There is no automatic rebuilding feature in Kentico. Unless you have created e.g. a custom scheduled task with the rebuilding code. Index rebuild is a complex and resource consuming operation. It should be done only when the structure of the index is changed - e.g. when you change the fields covered by the index, when you change cultures or e.g. the allowed/excluded content. In these cases, the structure of the index, where the data are saved got changed so the entire index has to be rebuilt from scratch.
On the other hand, if you you are adding or editing content, rebuild is not needed - the structure is the same, you just need to update the content of the index files. By default, this happens instantly when given content is changed. See processing of indexing tasks. Or, you can configure system to use a scheduled task to process the generated search tasks by using the CMSProcessSearchTasksByScheduler web.config key. With this key in place you can see the indexing tasks piling up in Smart Search -> Tasks tab and once the "Execute local search tasks" scheduled task (runs every 4 hours by default) is executed, those tasks from the list should be processed. Just to be clear, this is not rebuilding the index! Unless there was a rebuild task in the queue.
It can happen when using the scheduled task, that in the indexing tasks queue is one of more corrupted indexing tasks - and these can block the entire queue from being processed. Check the Event log for any errors. In this case, you can clear the indexing tasks queue and then manually rebuild the index so it will pick up the up to date data from the DB.

0 votesVote for this answer Mark as a Correct answer

Matthew King answered on June 1, 2022 11:22

Thanks for the replies. There is a scheduled task which is set to run daily to rebuild the smart search index's. Within the scheduled task it shows that it has been excecuted (last run date) however the index itself doesnt update. We have found manually rebuilding one then kicks it in for the following day but this isn't consistent.

0 votesVote for this answer Mark as a Correct answer

Matthew King answered on June 28, 2022 16:53

Anyone able to help with this? Managed to get the system to rebuild index's automatically on the 18th but nothing since then.....

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 29, 2022 05:12

I would recommend debugging the code of the custom scheduled task for index rebuilding to see what is going on.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.