-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, Master
-
Fix Version/s: 7.0.0 DXP FP35, 7.0.0 DXP SP7, 7.0.5 CE GA6, 7.0.X, 7.1.0 M1, 7.1.X, Master
-
Component/s: Search Infrastructure > Elasticsearch Connector
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Story Points:1
-
Fix Priority:4
-
Git Pull Request:
DESCRIPTION
When deleting an entire Community Site, any DLFolders belonging to that site are not removed from the Elasticsearch index unless a manual reindex is triggered.
However, when sending the folder to the recycle bin then deleting it first, it is removed properly. This is because we are triggering an index before it is removed from the DB. The same isn't true when removing the entire repository; we just remove everything from the DB without indexing.
STEPS TO REPRODUCE
1. Create a Liferay Site : Control Panel > Sites > Add Community Site
2. Create a DlFolde : Content > Documents and Media > Add a folder - LiferayTest
3. Use Elastic Head(chrome app) or Luke or any app to inspect search indices
4. Check if index is added for Liferay Test
5. You can use this query to check
{"query": {"bool": {"must": [{"term":{ "entryClassName":"com.liferay.document.library.kernel.model.DLFolder" }}]}}}
6. Delete the Liferay group/site you created: Control Panel > Site > Select site to delete
7. Check database: go to DlFolder table, no entry should exist
8. Use the query above or elastic head, Index still exists.
9. Attempt to reindex all search indexes
EXPECTED RESULTS
At step 8, Index for the LiferayTest folder should NOT exist
ACTUAL RESULTS
At step 8, Index for the LiferayTest folder exists
BRANCH
Reproduced
7600eef0012008bebaef69c723a9ade627f4aff8
MASTER
Reproduced
5d1f3bd7823efe9c4506d4b249115f83cec4405d