Ignixa.Search 0.6.41

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

Ignixa.Search

FHIR search parameter indexing and query infrastructure. Provides comprehensive support for FHIR search operations including parameter definitions, indexing, and query parsing.

Why Use This Package?

  • Full FHIR search support: Implements all FHIR search parameter types (string, token, reference, date, quantity, number, composite)
  • High-performance indexing: Extract search values from FHIR resources using FHIRPath
  • Query parsing: Parse FHIR search queries from URL parameters
  • Custom search parameters: Support for custom SearchParameter definitions from Implementation Guides

Installation

dotnet add package Ignixa.Search

Quick Start

Creating a Search Indexer (Easy Way)

For a specific FHIR version, use the factory:

using Ignixa.Search.Indexing;
using Ignixa.Specification.Generated;
using Microsoft.Extensions.Logging;

// Create logger factory
var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());

// Get FHIR schema provider for your version
var schemaProvider = new R4CoreSchemaProvider();
// Also available: R4BCoreSchemaProvider, R5CoreSchemaProvider, STU3CoreSchemaProvider

// Create indexer with all dependencies automatically configured
var indexer = SearchIndexerFactory.CreateInstance(
    schemaProvider,
    loggerFactory);

// That's it! Now you can index resources

Indexing a Resource

Extract search values from a FHIR resource:

using Ignixa.Abstractions;

// Index a Patient resource
IElement patientElement = GetPatientElement();
var searchIndexEntries = indexer.Extract(patientElement);

// searchIndexEntries contains:
// - name -> "John", "Doe" (string search params)
// - birthdate -> DateTime (date search params)
// - identifier -> token values (token search params)
// - etc.

foreach (var entry in searchIndexEntries)
{
    Console.WriteLine($"{entry.SearchParameter.Code}: {entry.Value}");
}

Parsing Search Queries

Parse FHIR search queries from URL parameters:

using Ignixa.Search.Parsing;

// Parse query string into parameters
var parameterParser = new QueryParameterParser();
var parameters = parameterParser.Parse("name=John&birthdate=gt2000-01-01&_count=50");

// Build search options
var expressionParser = new SearchParameterExpressionParser(...); // from DI
var builder = new SearchOptionsBuilder(expressionParser, searchParameterDefinitionManager);

var searchOptions = builder.Build("Patient", parameters);

// searchOptions contains parsed search criteria:
// - Expression: parsed search conditions
// - MaxItemCount: 50
// - ContinuationToken: for pagination

Search Parameter Types

Matches partial strings (case-insensitive, ignoring accents):

GET /Patient?name=John
GET /Patient?address=Boston

Exact match on codes, identifiers, booleans:

GET /Patient?identifier=123456
GET /Patient?gender=male
GET /Patient?active=true

// Token with system
GET /Patient?identifier=http://hospital.org|123456
// Reference to another resource
GET /Observation?patient=Patient/123
GET /Observation?subject=Patient/456

// Reference by identifier (chaining)
GET /Observation?patient.identifier=123456
// Date comparisons
GET /Patient?birthdate=2000-01-01         // equals
GET /Patient?birthdate=gt2000-01-01       // greater than
GET /Patient?birthdate=lt2010-12-31       // less than
GET /Patient?birthdate=ge2000-01-01       // greater or equal
GET /Patient?birthdate=le2010-12-31       // less or equal

// Date ranges
GET /Patient?birthdate=ge2000-01-01&birthdate=lt2001-01-01
// Quantity with value and unit
GET /Observation?value-quantity=5.4|http://unitsofmeasure.org|mg

// Quantity comparisons
GET /Observation?value-quantity=gt100|http://unitsofmeasure.org|mg
// Numeric values
GET /RiskAssessment?probability=0.8
GET /RiskAssessment?risk=gt0.5

Search Modifiers

// String modifiers
GET /Patient?name:exact=John              // Exact match
GET /Patient?name:contains=oh             // Contains
GET /Patient?address-city:exact=Boston

// Token modifiers
GET /Patient?identifier:of-type=MR|12345  // Identifier of type

// Reference modifiers
GET /Observation?subject:Patient=123      // Type modifier

Common Scenarios

Building Search Indices for Storage

// Index all patients in database
foreach (var patient in patients)
{
    var entries = indexer.Extract(patient);

    foreach (var entry in entries)
    {
        // Store in search parameter table
        await SaveSearchIndexEntry(
            patient.Id,
            entry.SearchParameter.Code,
            entry.SearchParameter.Type,
            entry.Value);
    }
}

Implementing FHIR Search API

using Ignixa.Search.Parsing;
using Microsoft.AspNetCore.Http;

// Parse incoming HTTP query string
var parameterParser = new QueryParameterParser();
var parameters = parameterParser.Parse(httpContext.Request.Query);

// Build search options
var searchOptions = searchOptionsBuilder.Build(resourceType, parameters);

// Execute search against database
var results = await ExecuteSearch(resourceType, searchOptions);

Custom Search Parameters

// Load custom SearchParameter from Implementation Guide
var customSearchParam = new SearchParameterInfo
{
    Code = "custom-identifier",
    Type = SearchParamType.Token,
    Expression = "Patient.extension.where(url='http://example.org/custom').value as Identifier",
    Url = "http://example.org/SearchParameter/custom-identifier"
};

// Register with definition manager
searchParameterDefinitionManager.AddSearchParameter(customSearchParam);

// Now indexer will extract values for custom-identifier
var entries = indexer.Extract(patient);

Integration with Other Packages

  • Ignixa.Specification: Provides default SearchParameter definitions for R4/R4B/R5
  • Ignixa.FhirPath: Used to evaluate SearchParameter expressions
  • Ignixa.PackageManagement: Load custom SearchParameters from Implementation Guides
  • Ignixa.DataLayer.*: Storage implementations use search indices for querying

Performance Considerations

  • Compiled FHIRPath: Search parameter expressions are compiled for faster indexing
  • Incremental indexing: Only re-index changed resources
  • Selective indexing: Skip indexing for search parameters not used in your queries

FHIR Specification Compliance

This implementation follows:

License

MIT License - see LICENSE file in repository root

Product Compatible and additional computed target framework versions.
.NET 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 (1)

Showing the top 1 NuGet packages that depend on Ignixa.Search:

Package Downloads
Ignixa.Search.Sql

FHIR search-to-SQL compiler infrastructure (alpha). Compiles a bound FHIR search expression tree into parameterized T-SQL against the Ignixa search-index schema. Experimental and not yet wired into a production data layer — the public API may change without notice.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.41 108 7/27/2026
0.6.28 110 7/22/2026
0.6.19 107 7/12/2026
0.6.7 101 7/9/2026
0.6.4 108 7/5/2026
0.5.13 110 7/3/2026
0.5.11 99 7/2/2026
0.5.6 115 6/17/2026
0.5.2 119 6/16/2026
0.5.0 115 6/15/2026
0.0.163 145 2/11/2026
0.0.160 130 2/9/2026
0.0.155 130 1/24/2026
0.0.151 126 1/21/2026
0.0.150 129 1/20/2026
0.0.149 133 1/19/2026
0.0.148 126 1/18/2026
0.0.142 132 1/12/2026
0.0.137 132 1/9/2026
0.0.127 134 12/29/2025
Loading failed