Purlin.Elasticsearch 1.2.1

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

Purlin.Elasticsearch

Index naming

Indices are declared by an index descriptor (e.g. searchable_listings), used both in IndexConfiguration.IndexDescriptor and in Repository<TId, TDocument>(indexDescriptor). The actual index name is resolved from ElasticsearchContextSettings:

  1. IndexNames[indexDescriptor] - an explicit name, if configured (keys are case-insensitive)
  2. {IndexPrefix}_{indexDescriptor} - if IndexPrefix is set
  3. indexDescriptor as is

Explicit names allow each index to be named independently, e.g. sharing some indices between environments while keeping others separate. The built-in migration_history and distributed_locks indices are resolved the same way.

"ElasticsearchContextSettings": {
  "Uri": "...",
  "ApiKey": "...",
  "IndexNames": {
    "searchable_listings": "pse_testing_searchable_listings",
    "migration_history": "pse_testing_migration_history",
    "distributed_locks": "pse_testing_distributed_locks"
  }
}

Cluster monitoring

ElasticsearchContext.ClusterMonitor exposes read-only cluster health checks, e.g. to apply backpressure before the cluster starts rejecting requests.

GetMemoryPressureAsync reads the JVM memory pressure of every node (GET _nodes/stats/jvm) - the old generation heap usage, the same metric Elastic Cloud uses for its "JVM memory pressure" alerts. Above ~75% garbage collection becomes aggressive, above ~85% circuit breakers start rejecting requests (circuit_breaking_exception). The call never throws for Elasticsearch or transport failures; check IsSuccess. It requires the monitor cluster privilege for the configured API key.

var memoryPressure = await context.ClusterMonitor.GetMemoryPressureAsync(cancellationToken: cancellationToken);

if (memoryPressure.IsSuccess && memoryPressure.MaxMemoryPressurePercent >= 75)
{
    // Slow down background writes
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.2.1 47 10/29/2026
1.2.0 48 10/29/2026
1.1.9 109 10/15/2026
1.1.8 513 9/8/2026
1.1.7 436 5/22/2026
1.1.6 145 5/6/2026
1.1.5 129 4/30/2026
1.1.4 225 4/13/2026
1.1.3 137 4/13/2026
1.1.2 186 3/29/2026
1.1.1 141 3/25/2026
1.1.0 188 2/26/2026
1.0.9 156 1/26/2026
1.0.8 162 1/22/2026
1.0.7 333 9/8/2025
1.0.6 926 7/10/2025
1.0.5 247 7/10/2025
1.0.4 232 7/1/2025
1.0.3 231 7/1/2025
1.0.2 234 6/30/2025
Loading failed