Tantivy

Latest version: v0.22.2

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 9

0.10.0

=====================

*Tantivy 0.10.0 index format is compatible with the index format in 0.9.0.*

- Added an API to easily tweak or entirely replace the
default score. See `TopDocs::tweak_score`and `TopScore::custom_score` (fulmicoton)
- Added an ASCII folding filter (drusellers)
- Bugfix in `query.count` in presence of deletes (fulmicoton)
- Added `.explain(...)` in `Query` and `Weight` to (fulmicoton)
- Added an efficient way to `delete_all_documents` in `IndexWriter` (petr-tik).
All segments are simply removed.

Minor
---------

- Switched to Rust 2018 (uvd)
- Small simplification of the code.
Calling .freq() or .doc() when .advance() has never been called
on segment postings should panic from now on.
- Tokens exceeding `u16::max_value() - 4` chars are discarded silently instead of panicking.
- Fast fields are now preloaded when the `SegmentReader` is created.
- `IndexMeta` is now public. (hntd187)
- `IndexWriter` `add_document`, `delete_term`. `IndexWriter` is `Sync`, making it possible to use it with a `Arc<RwLock<IndexWriter>>`. `add_document` and `delete_term` can
only require a read lock. (fulmicoton)
- Introducing `Opstamp` as an expressive type alias for `u64`. (petr-tik)
- Stamper now relies on `AtomicU64` on all platforms (petr-tik)
- Bugfix - Files get deleted slightly earlier
- Compilation resources improved (fdb-hiroshima)

How to update?

Your program should be usable as is.

Fast fields

Fast fields used to be accessed directly from the `SegmentReader`.
The API changed, you are now required to acquire your fast field reader via the
`segment_reader.fast_fields()`, and use one of the typed method:

- `.u64()`, `.i64()` if your field is single-valued ;
- `.u64s()`, `.i64s()` if your field is multi-valued ;
- `.bytes()` if your field is bytes fast field.

0.9.0

=====================

*0.9.0 index format is not compatible with the
previous index format.*

- MAJOR BUGFIX :
Some `Mmap` objects were being leaked, and would never get released. (fulmicoton)
- Removed most unsafe (fulmicoton)
- Indexer memory footprint improved. (VInt comp, inlining the first block. (fulmicoton)
- Stemming in other language possible (pentlander)
- Segments with no docs are deleted earlier (barrotsteindev)
- Added grouped add and delete operations.
They are guaranteed to happen together (i.e. they cannot be split by a commit).
In addition, adds are guaranteed to happen on the same segment. (elbow-jason)
- Removed `INT_STORED` and `INT_INDEXED`. It is now possible to use `STORED` and `INDEXED`
for int fields. (fulmicoton)
- Added DateTime field (barrotsteindev)
- Added IndexReader. By default, index is reloaded automatically upon new commits (fulmicoton)
- SIMD linear search within blocks (fulmicoton)

How to update ?

tantivy 0.9 brought some API breaking change.
To update from tantivy 0.8, you will need to go through the following steps.

- `schema::INT_INDEXED` and `schema::INT_STORED` should be replaced by `schema::INDEXED` and `schema::INT_STORED`.
- The index now does not hold the pool of searcher anymore. You are required to create an intermediary object called
`IndexReader` for this.

rust
// create the reader. You typically need to create 1 reader for the entire
// lifetime of you program.
let reader = index.reader()?;

// Acquire a searcher (previously `index.searcher()`) is now written:
let searcher = reader.searcher();

// With the default setting of the reader, you are not required to
// call `index.load_searchers()` anymore.
//
// The IndexReader will pick up that change automatically, regardless
// of whether the update was done in a different process or not.
// If this behavior is not wanted, you can create your reader with
// the `ReloadPolicy::Manual`, and manually decide when to reload the index
// by calling `reader.reload()?`.

0.8.2

=====================

Fixing build for x86_64 platforms. (496)
No need to update from 0.8.1 if tantivy
is building on your platform.

0.8.1

=====================

Hotfix of 476.

Merge was reflecting deletes before commit was passed.
Thanks barrotsteindev for reporting the bug.

0.8.0

=====================

*No change in the index format*

- API Breaking change in the collector API. (jwolfe, fulmicoton)
- Multithreaded search (jwolfe, fulmicoton)

0.7.1

=====================

*No change in the index format*

- Bugfix: NGramTokenizer panics on non ascii chars
- Added a space usage API

Page 6 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.