Craticula.OpenSearch.Client 1.3.0

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

Craticula.OpenSearch.Client

The OpenSearch execution adapter of Craticula. It compiles the canonical IR with Craticula.Search and runs the search body through OpenSearch.Client's low-level client, with deep paging (point in time and a cursor cache) and streamed export.

Install

dotnet add package Craticula.OpenSearch.Client

Depends on OpenSearch.Client [2.2.0, 3.0) and Craticula.Search.

Example

using Craticula.Core.Ir;
using Craticula.Core.Schema;
using Craticula.OpenSearch.Client;
using Craticula.Search;
using OpenSearch.Net;

public static class Example
{
    // One cache per host process, shared by every request of a grid session.
    private static readonly InMemorySearchCursorCache Cache = new();

    public static Task<OpenSearchGridPage> Fetch(
        IOpenSearchLowLevelClient client, string gridSessionId, GridSchema schema,
        FilterNode? filter, IReadOnlyList<SortItem>? sort, PageSpec page) =>
        OpenSearchGridQuery.FetchPageAsync(
            client,
            new SearchQueryRequest { Schema = schema, Filter = filter, Sort = sort, Page = page },
            gridSessionId,
            Cache);
}

Row count above 10,000

By default a count above the window (MaxResultWindow, 10,000) is reported as unknown (RowCount is null), which is cheap and lets the grid keep asking for blocks. To get the total, opt in: new OpenSearchDeepPagingOptions { ExactRowCount = true } makes the count request send track_total_hits: true. The engine then counts every matching document on each first-block request, so choose it knowingly. The page query and the compiled request do not change.

Elasticsearch

The compiled request is the same for OpenSearch and Elasticsearch (OSE-14). Only the point-in-time calls that deep paging and the export make differ (OSE-15), so the client takes a flavour. Set it on both options records when the cluster is Elasticsearch 8:

var paging = new OpenSearchDeepPagingOptions { Flavour = SearchEngineFlavour.Elasticsearch };
var export = new OpenSearchExportOptions { Flavour = SearchEngineFlavour.Elasticsearch };

The default is SearchEngineFlavour.OpenSearch. Against Elasticsearch with the default, a window past 10,000 rows and every export fail with HTTP 400, loudly.

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 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 61 11/26/2026
1.2.1 105 11/15/2026
1.2.0 146 11/12/2026
1.1.0 99 11/12/2026
1.0.0 108 11/10/2026