Craticula.Search
1.3.0
dotnet add package Craticula.Search --version 1.3.0
NuGet\Install-Package Craticula.Search -Version 1.3.0
<PackageReference Include="Craticula.Search" Version="1.3.0" />
<PackageVersion Include="Craticula.Search" Version="1.3.0" />
<PackageReference Include="Craticula.Search" />
paket add Craticula.Search --version 1.3.0
#r "nuget: Craticula.Search, 1.3.0"
#:package Craticula.Search@1.3.0
#addin nuget:?package=Craticula.Search&version=1.3.0
#tool nuget:?package=Craticula.Search&version=1.3.0
Craticula.Search
The search compiler of Craticula. It turns the canonical IR into an OpenSearch or Elasticsearch search request body
(plain JSON). It has no client dependency and never opens a connection (use Craticula.OpenSearch.Client to run it
against OpenSearch).
Install
dotnet add package Craticula.Search
Example
using Craticula.Core.Ir;
using Craticula.Core.Schema;
using Craticula.Search;
public static class Example
{
public static SearchQuery Compile(GridSchema schema, FilterNode? filter, IReadOnlyList<SortItem>? sort, PageSpec page)
{
SearchQuery query = SearchQueryBuilder.Build(
new SearchQueryRequest { Schema = schema, Filter = filter, Sort = sort, Page = page });
// query.Index names the index; query.ToArtifact() is the request body.
return query;
}
}
Counting rows
SearchQueryBuilder.BuildCount returns the page body with size 0 and without the sort and the row offset. Whether the total is exact or capped (track_total_hits) is your choice; the body never sets it. A grouped level carries two aggregations, bucket_count and missing_group_values: the number of groups is bucket_count plus 1 when missing_group_values.doc_count is above 0. Pass GridFilterPipeline.Process a NonePage for a count.
Compatibility
Implements Craticula spec version 0.3.0 (the language-neutral semantics and conformance fixtures in the
repository, spec/). Targets .NET 10.
License
Apache-2.0. Source and issues: https://github.com/pluries/craticula.
| Product | Versions 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. |
-
net10.0
- Craticula.Core (>= 1.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Craticula.Search:
| Package | Downloads |
|---|---|
|
Craticula.OpenSearch.Client
Craticula execution adapter for OpenSearch.Client: compiles the IR to a search body and runs it, with deep paging and streamed export. |
GitHub repositories
This package is not used by any popular GitHub repositories.