Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-76519

DLFolder Index is not deleted from Elasticsearch after deleting the site it belongs to

    Details

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              raven.song Raven Song
              Reporter:
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 39 weeks, 1 day ago

                Packages

                Version Package
                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