LeanCorpus 3.1.0 focuses on facets, aggregations and stability. It adds drill-down and drill-sideways search, hierarchical and range facets, date histograms, approximate aggregations, server-facing pagination and commit APIs, expanded global defaults, and a substantial set of search, indexing, shutdown and filesystem fixes.
Added
- Process-wide
LeanCorpusDefaultsconstruction defaults for codec and index-open policy, writer and searcher settings, manager refresh, JSON mapping, scoring, diagnostics and query resources. Defaults are published as immutable snapshots, affect future configurations only, and production continues to default to durable commits. (53a1471c2, 6a7ec82e5, #66) - Extended facet requests with deterministic bucket ordering, opt-in missing buckets, total-bucket metadata, offset and limit paging, logical request names and bounded exact collection. (236f0e4ba, 1119d8304, 180668e45, #64, #66)
- Hierarchical
FacetPathindexing andHierarchicalFacetRequestimmediate-child collection through existing string postings and sorted-set DocValues. (f8559fb65, 180668e45, #64, #66) DrillDownQueryfor exact facet selections and hierarchical path selections. (f8559fb65, #64, #66)SearchWithDrillSidewaysfor filtered hits with selected-dimension alternatives while retaining the other active constraints, with normal drill-down scoring and ordering semantics. (b086733b2, 1afa79195, #64, #66)- Explicit double, Int64 and UTC Unix-millisecond range facets with open bounds, boundary flags, document counts, missing buckets, paging and bounded request sizes. (b086733b2, 2c0b9ff02, 180668e45, #64, #66)
- UTC date histogram facets with fixed elapsed and calendar intervals, typed bucket boundaries, ISO Monday-start weeks and per-document bucket deduplication. (e23e4d4d5, 180668e45, #64, #66)
- Approximate numeric cardinality and percentile aggregations using bounded HyperLogLog++, t-digest and HDR-style states. HLL++ uses deterministic hashing, sparse/dense registers and bias correction, and approximate results identify the algorithm used. (bcde70031, 180668e45, 1afa79195, #54, #55, #64, #66)
- Commit generation and content-token metadata on
IndexWriterand acquiredSearcherLeaseinstances for server-side durability and snapshot coordination. (75c5f7c5b, 39e758aff, #63, #66) - Typed
SearchAfterValue, sort-value capture and explicit-valueSearchAfterAPIs for stable product-level cursor tie-breaks. (39e758aff, #63, #66) - Cancellation support for backup, snapshot backup and restore materialisation. (39e758aff, #63, #66)
Changed
- Numeric Stats aggregations define
Countas the number of observed numeric values, including repeated values, with explicit missing-value and IEEE-754 non-finite semantics. (304c71795, #64, #66) - Test execution and coverage now use xUnit v3 on Microsoft Testing Platform v2, MTP-native Coverlet and HangDump diagnostics. CI includes deterministic Linux framework coverage, complete Windows Core including Chaos, ARM64 smoke coverage and Windows hang-dump artefacts. (f61709902, 3321ce606, a5a04eadf, cbabf87f7, #73)
- Functional Core tests use an explicit non-durable process default while durability and recovery tests opt in per writer. (53a1471c2, #66)
- Core test cleanup relies on deterministic disposal and retry-aware deletion rather than process-wide forced garbage collection, with aligned xUnit package versions to avoid Windows stalls and restore warnings. (0517a030b, #68)
- Facet benchmarks now cover low and high cardinality, paging, missing values and multi-dimension multi-value collection against Lucene.NET sorted-set facets. (fec7408de, #64, #66)
Fixed
IndexSearcher.Search(..., topN: 0)now retains the correctTotalHitsin both synchronous and cancellable search paths instead of returning an empty zero-count result. (1afa79195, #66)- Boolean-query boosts are now applied consistently to collected scores, including streaming/nested Boolean execution, without using Block-Max WAND where its assumptions would produce incorrect boosted scoring. (1afa79195, #66)
- Exact facet and aggregation side collection no longer loses non-competitive matches when Block-Max WAND is enabled; analytic collectors now see every matching live document. (180668e45, #64, #66)
- Facet counts now count each matching document at most once per distinct bucket, including repeated values in multi-valued fields. (f8559fb65, #64, #66)
- Histogram aggregation no longer clamps observations into incorrect buckets when the exact bucket span exceeds its resource limit; non-finite values are rejected explicitly. (180668e45, #64, #66)
- DWPT backpressure accounting no longer acquires the writer lock while a DWPT monitor is held, avoiding lock inversion under concurrent producers. (53a1471c2, #66)
IndexWriterdisposal now uses the intended 30-second indexing-operation timeout, shares the normal operation-drain state machine, preserves resources after a timed-out drain, and allows a later disposal to complete teardown and deterministically release the write lock. (821540e41, 99b94ff3c, 363a2fe40, #66, #73)- Writer shutdown now cancels blocked producer backpressure waits, lazily starts the async write consumer only when asynchronous indexing is used, and shuts the consumer down without depending on normal thread-pool availability. (083b66d4c, 4690ef43b, eb79f6ac6, #66)
MMapDirectorynow resolves a relative path once at construction, keeping I/O and shared file-lifetime state bound to the original directory if the process working directory later changes. (1aaa33c5f)IndexOutputnow rejects every public operation after disposal and detaches its pooled write buffer before returning it, preventing a stale writer from modifying a subsequently rented buffer. (54dab0fc7)- Finalised
IndexInputinstances now release their deferred-deletion leases and queue pending file removal outside the finaliser thread. (624a411f0)
Compatibility
- This remains an additive API release over 3.0.0; existing public CLR entry points, source compatibility and index-format compatibility are retained. (#66)
- Server packages built from the 0.1.0-alpha.1 line require LeanCorpus 3.1.0 for the new commit, cancellation and pagination APIs. (5cf080e11, 61d516ff6, #63)