-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
breaking: started removing Examine from core depedencies #13851
breaking: started removing Examine from core depedencies #13851
Conversation
Hi there @bielu, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
… project is indepedant
7056fd2
to
e984791
Compare
Hi @bielu.. It looks pretty good already. To make the abstractions even better it would make sense to try to implement that using a non-lucene based search engine. E.g. Algolia |
@bergmania I am doing full abstraction, so result validation and specific configuration are going to be provider based (or by abstraction layer). So I am doing default implementation of Lucene Examine (leaving space for other Examine providers - potentially space for other Examine providers) |
@bielu, yep, I see and that's great :) |
@bergmania I was thinking about it and it might make sense to move search providers to separate repo at some point, also I am consider preparing Elastic Search provider(it is main search provider which I am using in projects). Having separate repo will make it easier to maintain it outside of Umbraco live cycle and deliver updates / new features in much easier way, what you think about it? |
@bielu having the abstractions outside of Umbraco is almost identical to using Examine. Examine is also just abstractions. |
@bergmania you misunderstood me here 😓, I mean just implementation for search provider, not abstractions! |
@bergmania I found few things, which I am not sure if we want to reintroduce, FriendlyPublishedContentExtensions have SearchDescendants method, which I think should not be part of Umbraco.Common package, if we want to reindrouce it we should move it to specific providers, also it use managed query which will be really expensive as it will query every field separately. |
@bielu, if possible I think we should try to keep an extension method with the same signature as in |
@bergmania as abstraction will be mostly for backoffice I think it should be moved to specific providers if we reintroduce it after changes, what you think? than people can use native DSL for each provider without us maintaining full blown abstraction, which I done for example here: https://github.com/bielu/SImpl.SearchModule, it allows to switch providers without rewriting search queries, but as every project of this type you paying with little of performance as queries are not optimaze as well as native DSL |
@bergmania I think abstraction will not change much from this stage, so we can start discussing them now. I noticed in new management api libraries there was few services which were created in relation to search, do you know if there any works now to do anything else related to search management? |
@bielu it is still under development and still subject to change alot, so it is too early to present any code |
@bergmania I am going to hang it for while, to have indexes from 12 in state where I can look and validate abstraction, as covering now with testing wouldn't make sense if I need rewrite abstraction tu support headless index :) |
@bielu I'm sorry, but I agree this make sense. I'll try to mention you when we have something. |
@bergmania any news on Headless index for v12 or not yet? |
@bergmania I am working on aligning my pr with changes related to DeliveryApi my question there:
|
hey @bergmania, |
Hi @bielu.. I'll just get some internal help to answer the questions, and return when I have answers.. The abstractions are only relevant for the content delivery api, and not search in general. |
Hi there @bielu 👋 I'm not sure you need to be overly concerned with the Delivery API implementation at this point. The search/query related parts of the Delivery API are built to be technology agnostic. Thus you won't find any Examine dependencies in the selectors ( The same goes for the query service ( Things get technology (Examine) specific in two places:
We have an ambition of making the notification handler more technology agnostic (provider based somehow), but it's not going to happen for 12.0 --- if at all. The handler performs a lot of assumptions that are mostly related to how the Examine index is built, so it might be impossible to abstract it into something that yields any value for alternative technology providers to leverage. With all of this in mind, let me try to answer your concrete questions 😆
They are for querying content items through the Delivery API only.
These are the concrete implementations of the sorting options specified in the Delivery API specification
The Delivery API query "language" is kept quite rudimentary at this point. Filters can be chained and will always be applied as AND. However, depending on the individual filter implementations, a single filter might perform a grouped OR on multiple values. Ultimately, all of this is up to the
Absolutely. These are built to power the individual query options of the Delivery API specification, and again - they are entirely technology agnostic.
This has only to do with procuring data for specific parts of the query options. One option (e.g. a selector or a filter) is backed by a one content indexer to provide the data necessary to utilise said option in a search. |
so my understanding based @kjac comments, only bits for me take care based on v12 changes:
and based on your "We have an ambition of making the notification handler more technology agnostic (provider based somehow), but it's not going to happen for 12.0" isnt it what is happening in this pr? :) |
@bielu correct 👍
Well yes 😄 🤞 |
…out-examine # Conflicts: # src/Umbraco.Cms.Api.Management/Controllers/Indexer/DetailsIndexerController.cs # src/Umbraco.Cms.Api.Management/Controllers/Indexer/RebuildIndexerController.cs # src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs # src/Umbraco.Cms.Api.Management/Controllers/Searcher/QuerySearcherController.cs # src/Umbraco.Cms.Api.Management/DependencyInjection/SearchManagementBuilderExtensions.cs # src/Umbraco.Cms.Api.Management/Factories/IndexPresentationFactory.cs # src/Umbraco.Cms.Api.Management/Services/ExamineManagerService.cs # src/Umbraco.Cms.Api.Management/Services/IExamineManagerService.cs # src/Umbraco.Cms.ManagementApi/Controllers/Indexer/AllIndexerController.cs # src/Umbraco.Cms.ManagementApi/Factories/IIndexViewModelFactory.cs # src/Umbraco.Cms.ManagementApi/ViewModels/Search/SearchResultViewModel.cs # src/Umbraco.Examine.Lucene/DependencyInjection/ConfigureIndexOptions.cs # src/Umbraco.Examine.Lucene/DependencyInjection/UmbracoBuilderExtensions.cs # src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs # src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs # src/Umbraco.Infrastructure/Services/IIndexingRebuilderService.cs # src/Umbraco.Infrastructure/Services/IndexingRebuilderService.cs # src/Umbraco.New.Cms.Infrastructure/Services/IIndexingRebuilderService.cs # src/Umbraco.New.Cms.Infrastructure/Services/IndexingRebuilderService.cs # src/Umbraco.Search.Examine.Lucene/DeliveryApiContentIndex.cs # src/Umbraco.Search.Examine/ExamineUmbracoIndexingHandler.cs # src/Umbraco.Search.Examine/UmbracoBuilderExtensions.cs # src/Umbraco.Search.Examine/ValueSetBuilders/Deferred/DeliveryApiContentIndexDeferredBase.cs # src/Umbraco.Search.Examine/ValueSetBuilders/Deferred/DeliveryApiContentIndexHandleContentChanges.cs # src/Umbraco.Search.Examine/ValueSetBuilders/Deferred/DeliveryApiContentIndexHandleContentTypeChanges.cs # src/Umbraco.Search.Examine/ValueSetBuilders/Deferred/DeliveryApiContentIndexHandlePublicAccessChanges.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeferredActions.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeliveryApiContentIndexFieldDefinitionBuilder.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeliveryApiContentIndexHelper.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeliveryApiContentIndexPopulator.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeliveryApiContentIndexUtilites.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeliveryApiContentIndexValueSetBuilder.cs # src/Umbraco.Search.Examine/ValueSetBuilders/DeliveryApiIndexingHandler.cs # src/Umbraco.Search.Examine/ValueSetBuilders/ExamineIndexingMainDomHandler.cs # src/Umbraco.Search.Examine/ValueSetBuilders/IDeferredAction.cs # src/Umbraco.Search.Examine/ValueSetBuilders/IDeliveryApiContentIndexFieldDefinitionBuilder.cs # src/Umbraco.Search.Examine/ValueSetBuilders/IDeliveryApiContentIndexHelper.cs # src/Umbraco.Search.Examine/ValueSetBuilders/IDeliveryApiContentIndexValueSetBuilder.cs # src/Umbraco.Search/NotificationHandlers/IDeliveryApiIndexingHandler.cs # src/Umbraco.Search/NotificationHandlers/IndexingNotificationHandler.DeliveryApi.cs # src/Umbraco.Search/Services/IIndexingRebuilderService.cs # src/Umbraco.Search/Services/IndexingRebuilderService.cs # src/Umbraco.Web.UI/Startup.cs # tests/Umbraco.Tests.Integration/DependencyInjection/UmbracoBuilderExtensions.cs # tests/Umbraco.Tests.Search.Examine/Umbraco.Examine.Lucene/UmbracoExamine/TestFiles.Designer.cs # tests/Umbraco.Tests.Search.Examine/UmbracoIntegrationTest.cs
Todo: ensure filtering for search request works todo: ensure sorting for search reuest works
todo: filtering, sorting todo: all tests
@kjac managed to get all changes from v12 included in this pr, working now on making tests working, but it would be great if someone would go through and make some comments around code, as there is a lot bits which I moved. I also have on list making filters and sorts working (as didnt implement it yet), but in general it would be great to get some feedback around if anything should be added / changed |
@bergmania than he might have all code done by then :), as hopefully manage to port all tests and missing small bits |
Sorry, the PR got closed because the v13/dev branch have been deleted and recreated from v12, due to new backoffice being targeting v14. Please open as new PR or if you can change the base branch, feel free do to that |
@bergmania will move stuff around from scratch as it will limit amount of code changes and conflicts, so will open new pr most likely in next few days |
HI @bergmania,
As started looking into #13620 and it seemed like it will be equally bit change as abstracting out examine, I started working on it.
To do: