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

Rename Examine based entity search service #15991

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Apr 4, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Description

As correctly pointed out in this comment, the newly introduced IExamineEntitySearchService is counter productive towards the eventual goal of decoupling ourselves a little more from Examine.

Furthermore, the naming in itself bleeds technology, which is clearly a mistake on yours truly when implementing the thing.

This PR renames it to IIndexedEntitySearchService instead. It was the best I could come up with 🙈

Testing this PR

Everything should still work exactly as before. Steps from #15972 can be reused, but basically - if document items can be searched, all is good. Don't forget to rebuild the Examine indexes, though 👍

@Migaroez
Copy link
Contributor

Migaroez commented Apr 5, 2024

Naming wise IIndexedEntitySearchService conveys that there is a requirement/desire to use an indexing mechanism, but in the methods defined on the interface there is no such explicit requirement.
So in my opinion we can just reduce it to IEntitySearchService as the only requirement is that the implementing class returns Entities based on search criteria

For the name of the implementing service, i would argue it doesn't matter if you bleed technology and it makes a lot of sense to be specific so it is more apparent of how/what the service does.

ExamineContentSearchService : IEntitySearchService
We use examine to only get Content (document,media,member) for specific search criteria

@Migaroez Migaroez added the project/bellissima AKA "the new backoffice" label Apr 5, 2024
Copy link
Contributor

@Migaroez Migaroez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to some non obvious collisions, we will stick to the naming. The purpose of the similar interfaces have been clarified 🥳.

Everything seems to work as before 💪

@bielu
Copy link
Contributor

bielu commented Apr 5, 2024

@Migaroez alternative name could be "IStorageEntitySearchService", which doesn't imply indexing, but that it looks into specific storage in this case examine index :)
cc: @kjac

@Migaroez Migaroez merged commit b552ccb into v14/dev Apr 5, 2024
16 checks passed
@Migaroez Migaroez deleted the v14/fix/rename-examine-entity-search-service branch April 5, 2024 15:42
@Migaroez
Copy link
Contributor

Migaroez commented Apr 5, 2024

@Migaroez alternative name could be "IStorageEntitySearchService", which doesn't imply indexing, but that it looks into specific storage in this case examine index :) cc: @kjac

I strongly disagree, storage implies persistence. Examine indexes do not persist entities they index them with possibly altered/partial data.

@bielu
Copy link
Contributor

bielu commented Apr 5, 2024

@Migaroez storage != persistence storage :) but getting your point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project/bellissima AKA "the new backoffice" release/14.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants