Ark.Framework.Search 9.1.0

dotnet add package Ark.Framework.Search --version 9.1.0
                    
NuGet\Install-Package Ark.Framework.Search -Version 9.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ark.Framework.Search" Version="9.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ark.Framework.Search" Version="9.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Ark.Framework.Search" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ark.Framework.Search --version 9.1.0
                    
#r "nuget: Ark.Framework.Search, 9.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ark.Framework.Search@9.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ark.Framework.Search&version=9.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Ark.Framework.Search&version=9.1.0
                    
Install as a Cake Tool

Ark.Framework.Search

Full-text search over published content for Ark: indexing on publish, a typed query builder with filters, ranges, sorting, highlights and facets, the search endpoints, and the reindex job. Add a provider such as Ark.Framework.Search.Lucene.

Install

dotnet add package Ark.Framework.Search - requires Ark.Framework.Infrastructure, Ark.Framework.AspNetCore, Ark.Framework.Search.Abstractions and a provider.

Setup

builder.Services.AddArk<ContentTypeKey>(ark =>
{
    ...
    ark.UseSearch<ContentTypeKey>(s => s.UseLucene());
});

app.MapArkSearch<ContentTypeKey>(o =>
{
    o.Types = [ContentTypeKey.NewsContent, ContentTypeKey.EventContent];   // all types unless set
    o.Query = q => q.FacetContentTypes().Facet("Category");
    o.Ranges = [SearchSchema.FirstPublishedField];
    o.Sorts = [SearchSchema.FirstPublishedField];                          // best match first only unless set
});

Add a migration after turning it on: it adds ArkSearchQueue, and ArkContentReferences on a site that didn't use UseContentReferences, which search turns on. On such a site, content counts as referring to something once it is next saved.

Main entry points

  • UseSearch<T>(...), SearchBuilder - turns on indexing and picks the provider.
  • ISearchService - starts an access-filtered SearchQuery<T>.
  • SearchQuery<T> - text, filters, ranges, sorting, paging, highlights and facets; hits carry the stored Fields.
  • MapArkSearch<T>(...), ArkSearchEndpointOptions<T> - the search endpoints and what visitors may ask.
  • ISearchIndexer - reindexes items, one or many at a time, or rebuilds the whole index.
  • ISearchIndexQueue - waits until the changes made so far are indexed, for tests and imports.
  • ISearchProvider - for writing a provider.

HTTP endpoints

Request Does
GET /api/search?q=&language=&type=&page=&pageSize=&f.{facet}=&from.{field}=&to.{field}=&sort=&desc=&resolve= { items: [{ id, contentType, language, score, highlights, fields, content? }], totalCount, page, pageSize, ready, facets? }, at most 100 per page; best match first, or by a sort field the site allows (desc=true for highest first); fields has references and links as the delivery API returns them; content only with resolve=true
POST /api/search/reindex starts a full rebuild: 202, or 409 when one runs. Admin
GET /api/search/reindex { running, processed, total, startedAt, completedAt, error }. Admin

Notes

  • Searches answer from the index alone: no database read, except LoadContent() / resolve=true for the page. The CMS content search (IContentSearchIndex) does too.
  • One document per language branch, of its current version (live, otherwise latest), with the read rules' principals: public searches return only what is live now and the visitor may read.
  • Content with Searchable unchecked is still indexed (CMS search and IncludeNotSearchable() find it); /api/search never returns it. Publishing a change to the checkbox updates the index.
  • A change is indexed in the background, usually within a second or two: every instance follows a queue of changes in the database, and an item is queued with everything that holds its text. A full rebuild continues from the queue once it takes over, so changes made during it are kept.
  • With UseJobs, adds ark-search-reindex (manual unless given a schedule). Mistakes in o.Query, o.Ranges, o.Sorts or property expressions stop the site at startup or throw ArgumentException.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ark.Framework.Search:

Package Downloads
Ark.Framework.Search.Lucene

Lucene.NET search provider for Ark.Framework.Search: an index on each instance's local disk, analysed per language, rebuilt in the background when missing (s.UseLucene()).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.1.0 0 11/23/2026

v9.1.0: Public packages, content type display texts, search sort order, Markdown images and tables

**Breaking for the CMS UI package**
- The npm package is renamed from `@ark/cms` to `@arkframework/cms` (and `@ark/cms/client` to `@arkframework/cms/client`). Change the dependency and the imports. To install a release candidate, map the scope to the cms-packages feed in `.npmrc`: `@arkframework:registry=https://pkgs.dev.azure.com/antonkronosjo/CMS/_packaging/cms-packages/npm/registry/`.

**New**
- Public packages: stable versions are published to nuget.org (`Ark.Framework.*`) and npmjs.org (`@arkframework/cms`), so a site needs no feed for them. Release candidates stay on the cms-packages feed.
- Release notes: every package carries its release's notes (`<releaseNotes>` in the `.nuspec`), shown on nuget.org.
- Content type display texts: `[DisplayText(language, name)]` on a content type, settings type, property or tab (`Tab = "..."`), repeatable per CMS language, with `Description`, and `Group` on a content type. The API sends them as `displayTexts` on `GET /api/content/types`, the creation, update and settings schemas and `GET /api/settings`. The CMS UI shows them - create picker names, descriptions and groups, field labels and help texts, tab and type names - before the site's `resources`.
- Search sort order: `o.Sorts` on `MapArkSearch` lists the index fields visitors may sort by, such as `SearchSchema.FirstPublishedField`. `GET /api/search?sort={field}&desc=true` picks one; without `sort` the order is best match first, as before. A sort the site didn't allow is a 400; a field in `o.Sorts` that can't be sorted on stops the site at startup. `searchContent` in `@arkframework/cms/client` takes `sort` and `desc`.

**Fixed**
- The CMS Markdown editor keeps images, GFM tables and raw HTML. Before, editing any text saved it without its images and tables, and with its HTML escaped. A table may be saved reformatted, with the same cells.

**Docs**
- Guide: a section on the CMS editor UI, and where stable versions and release candidates come from.

No migrations.