Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel Indexes contain non-channel Web Pages after they are Published #68

Closed
bluemodus-gshepherd opened this issue Aug 16, 2024 · 2 comments

Comments

@bluemodus-gshepherd
Copy link

bluemodus-gshepherd commented Aug 16, 2024

Describe the bug
When publishing a Web Page under a specific channel, that Web Page appears in search indexes not designated for the channel the Web Page was published under.

Search indexes appropriately exclude the Web Page when manually rebuilding the index (Development -> Search -> Rebuild).

To Reproduce
Steps to reproduce the behavior:

  1. Confirm you have configured at least 2 channels, Channel A and Channel B, for your instance.
  2. Confirm you have a search index configured for Channel A.
  3. Create and/or Publish a Web Page for Channel B
  4. Perform a Search against the search index
  5. See the Web Page published on Channel B appear in the results for Channel A

Expected behavior
The Web Page published in Channel B does not appear in the results for a search index configured for Channel A.

Screenshots

Library Version
Library Version
Kentico.Xperience.Lucene 7.0.0
Lucene.Net 4.8.0-beta00016

Desktop (please complete the following information):

  • N/A

Smartphone (please complete the following information):

  • N/A

Additional context
From my testing I didn't see a place where the Index's channel was compared against the IndexEventWebPageItemModel.WebsiteChannelName.

DefaultLuceneTaskLogger has a condition to see if the Web Page can be indexed by a specific index name (IndexedItemModelExtensions.IsIndexedByIndex(...)), but this always returned true and therefore did not prevent the item from being indexed. The method has access to both a retrieved index and the IndexEventWebPageItemModel channel names to compare and seemed like an adequate spot.

Our workaround was to configure a hard-coded string with the site code name and check it within a Custom Indexing strategy that we configured on the Index.

@liparova
Copy link
Collaborator

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

@bkapustik
Copy link
Collaborator

Fixed in pr #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants