U4-1898 - UmbracoExamine Rebuild index should not affect live site

Created by Shannon Deminick 12 Mar 2013, 12:51:13 Updated by Shannon Deminick 07 Sep 2015, 18:05:51

If an index already exists and a rebuild index command is executed we should rebuild the index in a temporary location (even in RAM directory) and then replace the live index with the temporary one so that the live site isn't affected. Currently when a rebuild index command is executed, the index is deleted and then is rebuild so during the rebuild search results will be empty.

Comments

Shannon Deminick 13 Feb 2015, 03:32:57

In order to do this correctly, any writes to the index would need to be blocked until the rebuilding is complete but searches should still be able to query, then when the index is merged, both reads/writes need to be blocked until that is done.


Dirk 14 Feb 2015, 10:53:09

I think it would be good to queue indexing of published items during rebuild. And after rebuild and merge process this queue. I guess the time for merging would be quite short, but the rebuild could last several minutes. Maybe the queueing could also be done during merge. Thus nothing gets lost.


Shannon Deminick 06 Aug 2015, 22:11:15

As it turns out Lucene does this all for us nicely without much work. I've had to refactor how index rebuilding works (much less code) and it will handle concurrent reading and blocking writing. In fact it actually does this today (based on what their docs say and how we currently do it), but the new way I've implemented is a lot nicer.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.3.0

Sprint:

Story Points:

Cycle: