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

Index is never deleted when CalEvent is deleted

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 5.1.2, 5.2.3, 6.0.0 Preview
    • Fix Version/s: 6.0.2 RC
    • Component/s: Calendar
    • Labels:
      None
    • Branch Version/s:
      5.2.x, 5.1.x

      Description

      CalEvents are never removed from the index when they are deleted. You'll notice this since these deleted events will continue to show up in the search portlet... cloggin up your search results with bad indexes.

      To fix this, just add these lines at the top of the deletEvent(..) method in CalEventLocalServiceImpl.java

      // Indexer

      try

      { Indexer.deleteEvent(event.getCompanyId(), event.getEventId()); }
      catch (SearchException se) { _log.error("Deleting index " + event.getEventId(), se); }

      so that it looks like this:

      public void deleteEvent(CalEvent event)
      throws PortalException, SystemException {

      // Indexer

      try { Indexer.deleteEvent(event.getCompanyId(), event.getEventId()); }

      catch (SearchException se)

      { _log.error("Deleting index " + event.getEventId(), se); }

      // Pool

      CalEventLocalUtil.clearEventsPool(event.getGroupId());

      thats it.

      Scott

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            scott.lee Scott Lee
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              10 years, 38 weeks, 2 days ago

                Packages

                Version Package
                6.0.2 RC