Changelog
All notable changes to TantivyDotNet are listed here. The format follows Keep a Changelog, and the project follows Semantic Versioning as described in the versioning policy. Before 1.0, minor versions may contain breaking changes; they're marked Breaking.
Unreleased
1.0.0-rc.2 - 2026-11-24
Changed
- Query text that nests parentheses or
NOTmore than 32 levels deep is no longer parsed. WithQueryParserOptions.Lenient, it matches nothing; otherwise it throwsQueryParseException. Queries built in code (Query.Booleanand the other factories) aren't affected.
Fixed
- A
SearchAftercursor used on a newer searcher, for example after aSearcherManagerrefresh, could return its own hit again and skip or repeat other documents tied with it on every sort key, because it compared document addresses that a merge had renumbered. A cursor now knows which snapshot it came from. On another snapshot, paging continues by sort value and skips the documents tied with the cursor; with a unique last sort key, such as an id, nothing is skipped or repeated. TheSearchAfterdocumentation and the paging guide describe what happens to a cursor when the index changes. Cursors from 1.0.0-rc.1 still work and are treated as coming from another snapshot.
1.0.0-rc.1 - 2026-11-23
The first release candidate. The public API is frozen: it's listed in PublicAPI.Shipped.txt, and 1.0.0 will ship it unchanged unless feedback on this release candidate turns up a problem. Any such change will be listed here.
Changed
- Breaking:
FieldDefinition,SegmentStats,FieldStatsandGarbageCollectionResultno longer have public constructors orDeconstructmethods, and their properties are get-only. They're results the library creates, and this lets later 1.x releases add properties to them. Read the properties instead of deconstructing. SearchHit.SnippetsandSearchHit.SortValuesno longer have publicinitaccessors (they couldn't be used, sinceSearchHithas no public constructor).
Added
TantivyErrorCode.IncompatibleIndex: opening an index whose Tantivy format this release can't read throwsTantivyExceptionwith this code and a message naming the formats involved.- Symbol package (
.snupkg) with SourceLink, so you can step into TantivyDotNet's source while debugging. Native debug symbols for each platform are attached to the GitHub Release. THIRD-PARTY-NOTICES.txtin the package, listing the licenses of the Rust crates compiled into the native library.- Documentation site with an API reference and guides: schema design, analyzers, queries, thread safety and lifetime, deployment, migrating from Lucene.NET, and versioning.
- Versioning policy, contributing guide, security policy, and issue and pull request templates.
Fixed
- On Windows,
Commit()could fail with "Access is denied" while searchers or anotherSearchIndexon the same directory were reloading. Index metadata is now replaced with a rename that works while readers have the file open, and briefly retried if Windows still refuses. - A failed
Commit()could later be published partially by a background merge, so readers saw documents from a commit that had thrown. A failed commit now rolls the writer back (the writer stays usable), andCommit()'s documentation says so. Rollback()reset the writer's merge policy to Tantivy's default. The policy fromIndexWriterOptionsis now kept.
0.4.0-preview.1 - 2026-11-23
Changed
- Faster searches: about 35% less time for term queries, 25% for OR queries and 40% for sorted queries, and about a third less managed memory per search. Counting a lone term query no longer visits the matches.
Fixed
- Inputs that made the native library panic or allocate without bound, found by fuzzing: field names that are empty or start with
-(now rejected bySchemaBuilder), dates outside the years 1677 to 2262,limit + offsetaboveuint.MaxValue, hugetermssizes and histogram bucket counts in aggregations,top_hitswithfrom, query-parser ranges with mixed number types, and facet values that aren't paths. - A very large
limitno longer reserves memory for that many hits up front. - Facet counts at the root (
/) were wrong for some category names (one-letter names, and names sharing a prefix).
0.3.0-preview.1 - 2026-11-22
Added
IndexSettingsat creation: doc store compression (Lz4,Zstdwith a level,None) and block size, saved with the index and readable asSearchIndex.Settings.IndexSettings.SortBy(experimental,TDN0001) stores documents ordered by a fast field.- Merge control:
IndexWriterOptions.MergePolicy(MergePolicy.Default,MergePolicy.None,LogMergePolicy),IndexWriter.ForceMerge(maxSegments)andIndexWriter.GarbageCollectFiles(). - Index statistics:
SearchIndex.GetStats()andSearcher.GetStats()with per-segment and per-field sizes. SearcherManager: one shared searcher for many requests, refreshed manually or on commit (RefreshOnCommit), with an optional warmer. Requests take aSearcherLease.
Changed
- An
IndexWriterthat is never disposed no longer blocks the finalizer thread waiting for merges; its finalizer abandons them and releases the lock.
0.2.0-preview.1 - 2026-11-22
Added
- Custom analyzers (
Analyzer,SchemaBuilder.AddAnalyzer): tokenizers (simple, whitespace, raw, n-gram, regex) and filters (lowercase, ASCII folding, stop words, stemming, remove long). Saved with on-disk indexes and restored bySearchIndex.Open.SearchIndex.Analyzeshows the terms a tokenizer produces. IndexWriterOptions,IndexWriter.UpdateDocumentandIndexWriter.DeleteDocuments(Query).SearchOptions.Fields(return only some stored fields) andSearcher.Explain.- Sorting by several keys (
SortBy.Field,SortBy.Score) and cursor paging (SearchHit.Cursor,SearchOptions.SearchAfter). QueryParserOptions: default fields and operator, per-field boosts, fuzzy fields, lenient parsing.- Queries:
Regex,Exists,TermSet,DisjunctionMax,ConstantScore,MoreLikeThis. - JSON fields (
AddJsonField) and IP address fields (AddIpAddressField). - Lucene.NET benchmarks and the WikiSearch sample app.
Changed
- Breaking: documents with a field the schema doesn't have are rejected with
TantivyException. SetIndexWriterOptions.IgnoreUnknownFieldsto ignore such fields as before. - Breaking:
SearchOptions.OrderByis a list ofSortBykeys, andSearchHit.SortValuebecameSearchHit.SortValues.SearchHitis a class. IndexWriter.Dispose()waits for background merges to finish.
0.1.0-preview.1 - 2026-11-22
First preview.
Added
- Schemas (
SchemaBuilder) with text, string, u64, i64, f64, bool, date, bytes and facet fields. - In-memory and on-disk indexes (
SearchIndex.CreateInRam,Create,Open), anIndexWriterwith add, delete, commit and rollback, and thread-safeSearchersnapshots. - Query strings and queries built in code (
Query.Term,Fuzzy,Phrase,Boolean,Range,Facet,Parse, boosts and&,|,!operators). SearchOptionswith snippets and highlighting, facet counts, sorting by a fast field, and Elasticsearch-style aggregations.- One NuGet package with native libraries for
win-x64,linux-x64,linux-arm64,osx-x64andosx-arm64, trimming- and NativeAOT-compatible.