diff --git a/Oqtane.Client/Modules/Admin/Search/Index.razor b/Oqtane.Client/Modules/Admin/Search/Index.razor index 23304e8d9..9fe16ee48 100644 --- a/Oqtane.Client/Modules/Admin/Search/Index.razor +++ b/Oqtane.Client/Modules/Admin/Search/Index.razor @@ -5,6 +5,12 @@ @inject IStringLocalizer SharedLocalizer
+
+ +
+ +
+
@@ -52,6 +58,7 @@ @code { public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; + private string _searchProvider; private string _enabled; private string _lastIndexedOn; private string _ignorePaths; @@ -62,6 +69,7 @@ protected override async Task OnInitializedAsync() { var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId); + _searchProvider = SettingService.GetSetting(settings, "Search_SearchProvider", Constants.DefaultSearchProviderName); _enabled = SettingService.GetSetting(settings, "Search_Enabled", "True"); _lastIndexedOn = SettingService.GetSetting(settings, "Search_LastIndexedOn", ""); _ignorePaths = SettingService.GetSetting(settings, "Search_IgnorePaths", ""); @@ -75,6 +83,7 @@ try { var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId); + settings = SettingService.SetSetting(settings, "Search_SearchProvider", _searchProvider); settings = SettingService.SetSetting(settings, "Search_Enabled", _enabled, true); settings = SettingService.SetSetting(settings, "Search_LastIndexedOn", _lastIndexedOn, true); settings = SettingService.SetSetting(settings, "Search_IgnorePaths", _ignorePaths, true); diff --git a/Oqtane.Client/Modules/Admin/Site/Index.razor b/Oqtane.Client/Modules/Admin/Site/Index.razor index cdbbfe04b..d51aa4a1c 100644 --- a/Oqtane.Client/Modules/Admin/Site/Index.razor +++ b/Oqtane.Client/Modules/Admin/Site/Index.razor @@ -156,12 +156,6 @@
-
- -
- -
-
@@ -438,7 +432,6 @@ private string _textEditorProvider = ""; private string _imageFiles = string.Empty; private string _uploadableFiles = string.Empty; - private string _searchProvider = string.Empty; private string _headcontent = string.Empty; private string _bodycontent = string.Empty; @@ -528,7 +521,6 @@ _imageFiles = (string.IsNullOrEmpty(_imageFiles)) ? Constants.ImageFiles : _imageFiles; _uploadableFiles = SettingService.GetSetting(settings, "UploadableFiles", Constants.UploadableFiles); _uploadableFiles = (string.IsNullOrEmpty(_uploadableFiles)) ? Constants.UploadableFiles : _uploadableFiles; - _searchProvider = SettingService.GetSetting(settings, "SearchProvider", Constants.DefaultSearchProviderName); // page content _headcontent = site.HeadContent; @@ -735,7 +727,6 @@ settings = SettingService.SetSetting(settings, "TextEditorProvider", _textEditorProvider); settings = SettingService.SetSetting(settings, "ImageFiles", (_imageFiles != Constants.ImageFiles) ? _imageFiles.Replace(" ", "") : "", false); settings = SettingService.SetSetting(settings, "UploadableFiles", (_uploadableFiles != Constants.UploadableFiles) ? _uploadableFiles.Replace(" ", "") : "", false); - settings = SettingService.SetSetting(settings, "SearchProvider", _searchProvider); await SettingService.UpdateSiteSettingsAsync(settings, site.SiteId); diff --git a/Oqtane.Client/Resources/Modules/Admin/Search/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Search/Index.resx index b43928bbd..06f2a834f 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Search/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Search/Index.resx @@ -159,4 +159,10 @@ Error Saving Search Settings + + Specify the search provider for this site + + + Search Provider: + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx index 5b0ea501d..392a68a65 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx @@ -435,10 +435,4 @@ Functionality - - Specify the search provider for this site - - - Search Provider: - \ No newline at end of file diff --git a/Oqtane.Server/Services/SearchService.cs b/Oqtane.Server/Services/SearchService.cs index 6bf7689d3..79187a1f6 100644 --- a/Oqtane.Server/Services/SearchService.cs +++ b/Oqtane.Server/Services/SearchService.cs @@ -13,7 +13,7 @@ namespace Oqtane.Services { public class SearchService : ISearchService { - private const string SearchProviderSettingName = "SearchProvider"; + private const string SearchProviderSettingName = "Search_SearchProvider"; private readonly IServiceProvider _serviceProvider; private readonly ISettingRepository _settingRepository;