mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-10-07 12:22:41 +00:00
The sstable streamer rebuilds the key of each entry it reads. It does this also for the entries that the automaton rejects. Many callers do not read the key. They only use term infos or term ordinals. Add `without_keys()` to the streamer builders. The resulting streamer does not rebuild keys. It gives term ordinals and values only. - `KeyTracking` (in tantivy-common) is the buffer for the current key. `Vec<u8>` keeps the key. `WithoutKeys` does nothing. - The streamer types get a generic parameter `K = Vec<u8>`. Existing type names keep the keyed behavior. `key()` and `next()` exist only on the keyed streamer. The keyless streamer has `next_without_key()`. - At the lower bound, the streamer does not know the previous key. It uses the lower bound prefix that the comparator found as the previous key. It then checks the upper bound on this prefix and the suffix, with the new `DeltaKeyComparator::compare_prefix_and_suffix`. - The FST streamer uses the same `KeyTracking`. Thus the `TermDictionary` facade has `without_keys()` on both backends. These callers now use `without_keys()`: AutomatonWeight, InvertedIndexRangeWeight, the quickwit warmup paths and the terms aggregation include/exclude regex.