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

Deprecate ILuceneSearchQueryService in OrchardCore.Search.Lucene #12587

Merged
merged 2 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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