search refactoring

This commit is contained in:
sbwalker
2024-07-06 07:58:04 -04:00
parent e321998b85
commit 5b46dd7293
18 changed files with 248 additions and 406 deletions

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using Oqtane.Models;
namespace Oqtane.Services
{
public interface ISearchIndexManager
{
int Priority { get; }
string Name { get; }
bool IsIndexEnabled(int siteId);
int IndexContent(int siteId, DateTime? startTime, Action<List<SearchContent>> processSearchContent, Action<string> handleError);
}
}

View File

@ -1,5 +1,3 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using Oqtane.Models;
@ -8,7 +6,7 @@ namespace Oqtane.Services
{
public interface ISearchService
{
void IndexContent(int siteId, DateTime? startTime, Action<string> logNote, Action<string> handleError);
Task SaveSearchContentAsync(List<SearchContent> searchContents);
Task<SearchResults> SearchAsync(SearchQuery searchQuery);
}

View File

@ -1,11 +1,12 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Oqtane.Models;
namespace Oqtane.Interfaces
{
public interface ISearchable
{
public List<SearchContent> GetSearchContents(PageModule pageModule, DateTime startTime);
public Task<List<SearchContent>> GetSearchContentsAsync(PageModule pageModule, DateTime lastIndexedOn);
}
}