NetEvolve.HealthChecks.Apache.Solr 5.11.2

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

NetEvolve.HealthChecks.Apache.Solr

NuGet NuGet

This package provides a health check for Apache Solr, based on the SolrNet.Core package. The main purpose is to check that the Solr server is reachable. The health check uses the Solr admin ping endpoint and does not require a core/collection name.

💡 This package targets .NET 8.0 and later.

Installation

To use this package, you need to add the package to your project. You can do this by using the NuGet package manager or by using the dotnet CLI.

dotnet add package NetEvolve.HealthChecks.Apache.Solr

Health Check - Apache Solr Liveness

This health check verifies Solr reachability via the admin ping endpoint.

  • If the server responds slower than the configured timeout, the result is Degraded.
  • If the server is not reachable or returns an error, the result is Unhealthy.

Usage

After adding the package, you need to import the namespace NetEvolve.HealthChecks.Apache.Solr and add the health check to the service collection.

using NetEvolve.HealthChecks.Apache.Solr;

You can register the health check via configuration or code. In both approaches you must provide a unique name.

Parameters

  • name: Unique health check name used to match configuration.
  • options: Optional configuration when using the builder approach. Supported options: BaseUrl (string), Timeout (milliseconds), and CreationMode (Create or ServiceProvider).
  • tags: Optional tags appended to the defaults. The tags solr, apache, and search are always included.

Variant 1: Configuration based

Add a configuration section under HealthChecks:Solr in appsettings.json, then register by name.

var builder = services.AddHealthChecks();

builder.AddSolr("<name>");

Example appsettings.json:

{
  "HealthChecks": {
    "Solr": {
      "my-solr": {
        "BaseUrl": "http://localhost:8983",
        "Timeout": 100,
        "CreationMode": "Create" // or "ServiceProvider" when Solr client is registered in DI
      }
    }
  }
}

Variant 2: Builder based

Use this approach when values are dynamic or you have a single instance.

var builder = services.AddHealthChecks();

builder.AddSolr("my-solr", options =>
{
  options.BaseUrl = "http://localhost:8983";
  options.Timeout = 100; // milliseconds
  options.CreationMode = ClientCreationMode.Create; // default: ServiceProvider
});

Example Program.cs registration and endpoint exposure:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddHealthChecks()
  .AddSolr("my-solr");

var app = builder.Build();

app.MapHealthChecks("/health");

app.Run();

When using CreationMode = ServiceProvider, ensure an ISolrBasicReadOnlyOperations<string> client is registered in DI before adding the health check.

Tags

You can provide additional tags to group or filter health checks.

var builder = services.AddHealthChecks();

builder.AddSolr("my-solr", options => { /* ... */ }, "critical", "liveness");

License

This project is licensed under the MIT License - see the LICENSE file for details.

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
5.11.2 76 1/1/2026
5.10.32 78 12/29/2025