Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.5.0, 3.3.33, 4.4.4
-
None
-
Ibexa DXP with elastic search enabled
-
Yes
Description
If you swap locations with two different content types you'll get a corrupted search index; Both locations will appear twice in the content tree after the swap operations has completed. Inspecting the elastic search index afterwards, you'll notice that both locations have duplicate location entries.
In short, swapping two Articles will work just fine. Swapping a "Folder A" and an "Article A" will cause the problem.
The reason for this is that in elastic search we partition the content in indices per content type. So when location of "Folder A" is moved to "Article A"'s location, a new location record for "Folder A" is created in the default_location_eng_gb_2 index, but the old record is not cleaned up from default_location_eng_gb_1. (ContentTypeID for Folder is 1, ContentTypeID for Article is 2)
When swapping two locations of the same content type, the new location record will simply overwrite the existing record as we are only dealing with the one index and the problem does not occur