MintPlayer.Spark.Search 11.0.0

dotnet add package MintPlayer.Spark.Search --version 11.0.0
                    
NuGet\Install-Package MintPlayer.Spark.Search -Version 11.0.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="MintPlayer.Spark.Search" Version="11.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MintPlayer.Spark.Search" Version="11.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MintPlayer.Spark.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 MintPlayer.Spark.Search --version 11.0.0
                    
#r "nuget: MintPlayer.Spark.Search, 11.0.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 MintPlayer.Spark.Search@11.0.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=MintPlayer.Spark.Search&version=11.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MintPlayer.Spark.Search&version=11.0.0
                    
Install as a Cake Tool

MintPlayer.Spark.Search

Search across the entity types of a MintPlayer.Spark application (#238). Guide: Site Search.

builder.Services.AddSpark(builder.Configuration, spark => spark
    .AddSearch());

Opt a type in from its model JSON:

"search": { "enabled": true, "label": "{Title} - {Artist}", "fields": ["Lyrics"], "fuzzy": true }
  • label defaults to the type's breadcrumb. Two visible objects with the same label get the type's label, and a number among the namesakes of one type, so every suggestion names exactly one object.
  • fields are searched besides the label's attributes. Only string and string-collection properties count.
  • Every hit is re-read through the type's list query as the caller, so query rights, row policies and redaction apply exactly as on the list page. A provider only proposes candidates.
  • By default the app's generated Spark_Search RavenDB index answers. The generator writes it into the application (never a library) when the app references this package. An engine package (MintPlayer.Spark.Search.OpenSearch) can take over; the RavenDB index stays the fallback while the engine is unreachable.
  • With AddPrerendering, the SPA's results page (/search?q=) is server-rendered with its results.

Endpoints (anonymous, rate limited per address): GET /spark/search?q=&take=, GET /spark/search/suggest?q=, GET /spark/search/resolve?q=.

Options

spark.AddSearch(s => ...):

Option Default
Fuzzy true Typos tolerated; a type's search.fuzzy overrides it.
MaxSuggestions 8
MaxResults 50
MinTermLength 2 A shorter term returns nothing.
RateLimit / RateLimitWindow 120 / 1 min Per client address, across the three endpoints.
SearchPagePath /search The SPA's results page.
UseProvider<T>(services) Another ISparkSearchProvider; the RavenDB one stays the fallback.

The provider contract

An ISparkSearchProvider proposes candidates (type name, id), best first; it never decides what a caller sees.

  • The core re-reads every candidate as the caller and drops the rest, without a trace: a dropped row does not count toward a label's number, so a hit never reveals that a hidden namesake exists. A provider therefore needs no security, and its index may hold rows the caller cannot read.
  • The core asks for more than it shows, because the re-read removes some.
  • Ids may come back in any casing (RavenDB ids are case-insensitive; an index projection answers lower-cased).
  • FindByLabelAsync returns every object whose text contains all the label's words; the core compares the rendered labels.
  • Terms arrive reduced to letters and digits. A provider that queries RavenDB still passes them as query parameters, never spliced into RQL.

Design: docs/spark_search_PRD.md.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on MintPlayer.Spark.Search:

Package Downloads
MintPlayer.Spark.Search.OpenSearch

An OpenSearch engine for MintPlayer.Spark.Search: search-as-you-type with typo tolerance, kept in sync from the application's Spark_Search index, with the RavenDB index as the fallback while the engine is unreachable.

MintPlayer.Spark.OpenSearchDescription

Browser search for MintPlayer.Spark: an OpenSearch description (/opensearch.xml) whose suggestions and searches go through MintPlayer.Spark.Search, served through MintPlayer.AspNetCore.OpenSearch.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0 42 11/18/2026