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

MNT-24270 Disable Faceting when we have unknown nodes in the search results #2504

Conversation

evasques
Copy link
Contributor

@evasques evasques commented Mar 12, 2024

Unknown nodes can appear in the search results if the nodes where deleted or permissions changed while the index is not yet up to date or if we disabled permission checks on the search engine.

In this case the total items will not match the number of entries that are returned and the facet hits will be wrong. Changes made were:

  • In v1, correct the total items and don't return facets, facet queries, facet fields, pivots, etc when we detect unknown nodes in the results
  • In alfresco-share-services, correct the total items based in the failed nodes count and don't send facets
  • Added test

evasques added 5 commits March 8, 2024 17:25
…e faceting, pivots and stats as the hit counts would be incorrect
…into fix/MNT-24270_disableFacetingOnUnkownNodesInSearchResults
@evasques evasques requested a review from jottley March 15, 2024 10:58
@evasques evasques requested a review from tpage-alfresco March 15, 2024 14:35
@tpage-alfresco
Copy link
Member

tpage-alfresco commented Mar 15, 2024

In v1, correct the total items and don't return facets, facet queries, facet fields, pivots, etc when we detect unknown nodes in the results

This sounds concerning. Isn't it better to return slightly wrong results than no results?

@evasques
Copy link
Contributor Author

evasques commented Mar 15, 2024

@jottley was who discussed the issue with the customer and the incorrect facet results were confusing the users much more.

IMO from a security perspective, by showing the possibly real result count (when we have permissions disabled on SOLR for example) we are disclosing that we have X number of documents with that term (and because its facets we are actually exposing dates, creators, modifiers, etc as we show the hits on each ) despite the user only having access to a subset of those. Its safer to not return that info than leak that we have a document that matches your search but you don't have permissions to see it.

@jottley
Copy link
Member

jottley commented Mar 15, 2024

@tpage-alfresco Like Eva indicated, the customer is having issues with the fact that a single document could be returned and they are seeing facets/counts from across the repo indicating the total documents are much higher. They also don't like seeing facets that don't even apply to the result set. For example a single document returned but a facet count of 4 but nothing returned when the navigate to the facet. We discussed with them a customization/configuration to remove the facets from being seen but they still want/rely on the facets. This appears to be an acceptable approach.

@jottley
Copy link
Member

jottley commented Sep 20, 2024

As the related JIRA has been closed and the decision to no go forward with this approach, I am going to close this PR

@jottley jottley closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants