using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Search;
namespace MediaBrowser.Controller.Library;
///
/// Orchestrates search operations across registered search providers.
///
public interface ISearchManager
{
///
/// Searches for items and returns hints suitable for autocomplete/typeahead UI.
/// Results are ordered by relevance score from search providers.
///
/// The search query including filters and pagination.
/// Cancellation token.
/// Paginated search hints with item metadata for display.
Task> GetSearchHintsAsync(
SearchQuery query,
CancellationToken cancellationToken = default);
///
/// Gets ranked search results from registered providers. Returns only item IDs and
/// relevance scores; callers are responsible for loading items and applying user-access filtering.
///
/// The search provider query with type/media filters.
/// Cancellation token.
/// Search results containing item IDs and relevance scores.
Task> GetSearchResultsAsync(
SearchProviderQuery query,
CancellationToken cancellationToken = default);
///
/// Registers search providers discovered through dependency injection.
/// Called during application startup.
///
/// The search providers to register.
void AddParts(IEnumerable providers);
///
/// Gets all registered search providers ordered by priority.
///
/// The list of search providers including the SQL fallback provider.
IReadOnlyList GetProviders();
}