NuGet ยท nuget

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SimpleSearch

Core Feature for Simple Search indexing within the Eltheon framework

Install

Install-Kommandos

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SimpleSearch --version 0.9.0.1
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SimpleSearch" Version="0.9.0.1" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SimpleSearch --version 0.9.0.1
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SimpleSearch -Version 0.9.0.1

README

Vorschau

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SimpleSearch

Overview

The SimpleSearch feature indexes localized Razor content into the Eltheon in-memory data store and offers a lightweight query surface for REST endpoints. It is responsible for:

  • Aggregating localization metadata (Meta_SimpleSearch_*) into a searchable structure via SimpleSearchIndexManager.
  • Hosting SimpleSearchIndexingService, a background service built on the Service feature that rebuilds the index on demand or via triggers.
  • Providing ISimpleSearchQuery so web projects can resolve filtered search results without duplicating queue/database logic.

Usage

Register the feature in your host/template:

builder.Services.AddSingleton<ISimpleSearchIndexManager, SimpleSearchIndexManager>();
builder.Services.AddSingleton<ISimpleSearchQuery, SimpleSearchQuery>();
builder.Services.AddHostedService<SimpleSearchIndexingService>();

Then inject ISimpleSearchQuery into your API/controller and call:

var results = _simpleSearchQuery.Search(query, areaFilter, CultureInfo.CurrentUICulture);

Returns IEnumerable<SearchResult> (Title, Url, Description, Keywords). A null result indicates that no index exists for the current culture.

Dependencies

  • Requires the Localization feature for CompositeStringLocalizer to enumerate page metadata.
  • Uses the InMemory feature (InMemoryDatabaseFactory) to persist the search index in a global table.
  • Integrates with the Service feature so indexing can be scheduled or triggered through standard service configs.

Notes

  • Ensure GlobalConfig.LocalizationPath points to a directory containing localization.json entries with Meta_SimpleSearch_* keys; otherwise the index will remain empty.
  • The feature is storage agnostic: hosts can expose the query surface over REST, GraphQL or Razor by wiring ISimpleSearchQuery wherever needed.