|
1 | 1 | //! Tantivy can (if instructed to do so in the schema) store the term positions in a given field.
|
2 | 2 | //! This position is expressed as token ordinal. For instance,
|
3 |
| -//! In "The beauty and the beast", the term "the" appears in position 0 and position 4. |
| 3 | +//! In "The beauty and the beast", the term "the" appears in position 0 and position 3. |
4 | 4 | //! This information is useful to run phrase queries.
|
5 | 5 | //!
|
6 | 6 | //! The [position](../enum.SegmentComponent.html#variant.Positions) file contains all of the
|
7 | 7 | //! bitpacked positions delta, for all terms of a given field, one term after the other.
|
8 | 8 | //!
|
9 | 9 | //! Each term is encoded independently.
|
10 |
| -//! Like for positing lists, tantivy relies on simd bitpacking to encode the positions delta in |
11 |
| -//! blocks of 128 deltas. Because we rarely have a multiple of 128, a final block may encode the |
12 |
| -//! remaining values variable byte encoding. |
| 10 | +//! Like for posting lists, tantivy relies on simd bitpacking to encode the positions delta in |
| 11 | +//! blocks of 128 deltas. Because we rarely have a multiple of 128, the final block encodes |
| 12 | +//! the remaining values with variable int encoding. |
13 | 13 | //!
|
14 |
| -//! In order to make reading possible, the term delta positions first encodes the number of |
15 |
| -//! bitpacked blocks, then the bitwidth for each blocks, then the actual bitpacked block and finally |
| 14 | +//! In order to make reading possible, the term delta positions first encode the number of |
| 15 | +//! bitpacked blocks, then the bitwidth for each block, then the actual bitpacked blocks and finally |
16 | 16 | //! the final variable int encoded block.
|
17 | 17 | //!
|
18 | 18 | //! Contrary to postings list, the reader does not have access on the number of positions that is
|
|
0 commit comments