Kentico / xperience-by-kentico-lucene

Xperience by Kentico search integration with the latest 4.8 beta version of Lucene.NET
MIT License
4 stars 4 forks source link

Unpublishing event is not registered and handled #64

Closed Felwick closed 1 month ago

Felwick commented 1 month ago

Description:

Unpublished or archived pages are still part of the index content regardless of them being in unpublished state.

Reproduction steps:

  1. Create a page with unique name and information and publish it
  2. Search this page and confirm it is in the index
  3. Unpublish the page
  4. Check that the page can be still looked up in the index via search

Expected behavior:

Page should be removed from index by task when it is unpublished.

More details:

It seems that even though DefaultLuceneTaskLogger is expecting unpublish or archive events to come through in order to log tasks, LuceneSearchModule is only registering event delegate for these specific events:

    WebPageEvents.Publish.Execute += HandleEvent;
    WebPageEvents.Delete.Execute += HandleEvent;
    ContentItemEvents.Publish.Execute += HandleContentItemEvent;
    ContentItemEvents.Delete.Execute += HandleContentItemEvent;

Library Version

Kbank site on 7.0.1

liparova commented 1 month ago

Thank you for bringing this to our attention. We will investigate and keep you informed of our progress.