From 146a47bf8f6f169f7f94d4b2c9a47ab7473941b9 Mon Sep 17 00:00:00 2001 From: Jasmin Savard Date: Tue, 11 Oct 2022 15:33:51 -0400 Subject: [PATCH 1/5] Remove ILuceneSearchQueryService from OrchardCore.Search.Lucene --- .../Services/ILuceneSearchQueryService.cs | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/ILuceneSearchQueryService.cs diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/ILuceneSearchQueryService.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/ILuceneSearchQueryService.cs deleted file mode 100644 index 8fa536bc2c2..00000000000 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/ILuceneSearchQueryService.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Lucene.Net.Search; - -namespace OrchardCore.Search.Lucene.Services -{ - [Obsolete("This interface has been deprecated and we will be removed in the next major release, please use OrchardCore.Search.Lucene.Abstractions instead.", false)] - public interface ILuceneSearchQueryService - { - /// - /// Provides a way to execute a search request in Lucene based on a Lucene Query. - /// - /// - /// - /// - /// - /// IList<string> - Task> ExecuteQueryAsync(Query query, string indexName, int start = 0, int end = 20); - } -} From d53b23db573736131775e7ddc8569d865bb52164 Mon Sep 17 00:00:00 2001 From: Jasmin Savard Date: Tue, 11 Oct 2022 15:47:58 -0400 Subject: [PATCH 2/5] Add doc and remove Abstraction.ILuceneSearchQueryService --- .../OrchardCore.Search.Lucene/Controllers/SearchController.cs | 4 ++-- .../Services/LuceneSearchQueryService.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Search.Lucene/Startup.cs | 2 +- src/docs/releases/1.5.0.md | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Controllers/SearchController.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Controllers/SearchController.cs index 2e4a1a7f709..f77243587cf 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Controllers/SearchController.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Controllers/SearchController.cs @@ -30,7 +30,7 @@ public class SearchController : Controller private readonly LuceneIndexingService _luceneIndexingService; private readonly LuceneIndexSettingsService _luceneIndexSettingsService; private readonly LuceneAnalyzerManager _luceneAnalyzerManager; - private readonly Abstractions.ILuceneSearchQueryService _searchQueryService; + private readonly ILuceneSearchQueryService _searchQueryService; private readonly ISession _session; private readonly IStringLocalizer S; private readonly IEnumerable _permissionProviders; @@ -44,7 +44,7 @@ public SearchController( LuceneIndexingService luceneIndexingService, LuceneIndexSettingsService luceneIndexSettingsService, LuceneAnalyzerManager luceneAnalyzerManager, - Abstractions.ILuceneSearchQueryService searchQueryService, + ILuceneSearchQueryService searchQueryService, ISession session, IStringLocalizer stringLocalizer, IEnumerable permissionProviders, diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneSearchQueryService.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneSearchQueryService.cs index f4e17b647ee..6d6788478e6 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneSearchQueryService.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneSearchQueryService.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Search.Lucene.Services { - public class LuceneSearchQueryService : Abstractions.ILuceneSearchQueryService + public class LuceneSearchQueryService : ILuceneSearchQueryService { private readonly LuceneIndexManager _luceneIndexManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Startup.cs index c90e32f6a3a..d211fca9d76 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Startup.cs @@ -60,7 +60,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/src/docs/releases/1.5.0.md b/src/docs/releases/1.5.0.md index 8a4efbdd389..cf0288feed0 100644 --- a/src/docs/releases/1.5.0.md +++ b/src/docs/releases/1.5.0.md @@ -6,6 +6,8 @@ * Lucene breaking changes. See [this pull request](https://github.com/OrchardCMS/OrchardCore/pull/11052) for details. +ILuceneSearchQueryService moved to OrchardCore.Search.Lucene.Abstractions module. + ## Lucene Migration Manual migration to get back Lucene Indices Settings, Deployment plans, and Queries. (Reference only) From 7fe319d5eeb40fea8ac6c4e86ee77551367d05b4 Mon Sep 17 00:00:00 2001 From: Jasmin Savard Date: Tue, 11 Oct 2022 15:48:30 -0400 Subject: [PATCH 3/5] Rename namespace --- .../ILuceneSearchQueryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore/OrchardCore.Search.Lucene.Abstractions/ILuceneSearchQueryService.cs b/src/OrchardCore/OrchardCore.Search.Lucene.Abstractions/ILuceneSearchQueryService.cs index c3b4279f3b9..65d1d6433c9 100644 --- a/src/OrchardCore/OrchardCore.Search.Lucene.Abstractions/ILuceneSearchQueryService.cs +++ b/src/OrchardCore/OrchardCore.Search.Lucene.Abstractions/ILuceneSearchQueryService.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Lucene.Net.Search; -namespace OrchardCore.Search.Lucene.Abstractions +namespace OrchardCore.Search.Lucene { public interface ILuceneSearchQueryService { From b500bcb435753d069b0057d8e90070ce6d3e7acd Mon Sep 17 00:00:00 2001 From: Jasmin Savard Date: Tue, 11 Oct 2022 16:25:20 -0400 Subject: [PATCH 4/5] doc --- src/docs/releases/1.5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/releases/1.5.0.md b/src/docs/releases/1.5.0.md index cf0288feed0..4f4d4d7395a 100644 --- a/src/docs/releases/1.5.0.md +++ b/src/docs/releases/1.5.0.md @@ -6,7 +6,7 @@ * Lucene breaking changes. See [this pull request](https://github.com/OrchardCMS/OrchardCore/pull/11052) for details. -ILuceneSearchQueryService moved to OrchardCore.Search.Lucene.Abstractions module. +ISearchQueryService moved to OrchardCore.Search.Lucene.Abstractions module as ILuceneSearchQueryService. The OrchardCore.Search module now takes into consideration multiple search provider implementations. ## Lucene Migration From 46d047bda2c5fc8dfef0eed176852ddf6708ca1e Mon Sep 17 00:00:00 2001 From: Jasmin Savard Date: Wed, 12 Oct 2022 11:08:29 -0400 Subject: [PATCH 5/5] doc --- src/docs/releases/1.5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/releases/1.5.0.md b/src/docs/releases/1.5.0.md index 4f4d4d7395a..3639acec31d 100644 --- a/src/docs/releases/1.5.0.md +++ b/src/docs/releases/1.5.0.md @@ -6,7 +6,7 @@ * Lucene breaking changes. See [this pull request](https://github.com/OrchardCMS/OrchardCore/pull/11052) for details. -ISearchQueryService moved to OrchardCore.Search.Lucene.Abstractions module as ILuceneSearchQueryService. The OrchardCore.Search module now takes into consideration multiple search provider implementations. +`ISearchQueryService` moved to `OrchardCore.Search.Lucene.Abstractions` module as `ILuceneSearchQueryService`. The `OrchardCore.Search` module now takes into consideration multiple search provider implementations. ## Lucene Migration