Skip to content

Commit

Permalink
Deprecate ILuceneSearchQueryService in OrchardCore.Search.Lucene (#12587
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Skrypt authored Oct 8, 2022
1 parent 4ac7de8 commit 5fe2ed7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
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
{
/// <summary>
/// Provides a way to execute a search request in Lucene based on a Lucene Query.
/// </summary>
/// <param name="query"></param>
/// <param name="indexName"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns><see cref="IList{String}">IList&lt;string&gt;</see></returns>
Task<IList<string>> ExecuteQueryAsync(Query query, string indexName, int start = 0, int end = 20);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace OrchardCore.Search.Lucene.Services
{
public class LuceneSearchQueryService : ILuceneSearchQueryService
public class LuceneSearchQueryService : Abstractions.ILuceneSearchQueryService
{
private readonly LuceneIndexManager _luceneIndexManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddSingleton<LuceneAnalyzerManager>();
services.AddScoped<LuceneIndexingService>();
services.AddScoped<IModularTenantEvents, LuceneIndexInitializerService>();
services.AddScoped<ILuceneSearchQueryService, LuceneSearchQueryService>();
services.AddScoped<Abstractions.ILuceneSearchQueryService, LuceneSearchQueryService>();
services.AddScoped<INavigationProvider, AdminMenu>();
services.AddScoped<IPermissionProvider, Permissions>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Threading.Tasks;
using Lucene.Net.Search;

namespace OrchardCore.Search.Lucene
namespace OrchardCore.Search.Lucene.Abstractions
{
public interface ISearchQueryService
public interface ILuceneSearchQueryService
{
/// <summary>
/// Provides a way to execute a search request in Lucene based on a Lucene Query.
Expand Down

0 comments on commit 5fe2ed7

Please sign in to comment.