mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-10-05 19:35:46 +00:00
Simplify tie-breaker start bound and doc comment
This commit is contained in:
@@ -31,7 +31,7 @@ pub(crate) fn serialize_generated_tie_breaker_column(
|
||||
output: &mut impl Write,
|
||||
) -> io::Result<()> {
|
||||
// TODO: Lift this temporary u32 limit once downstream consumers support the full u64 range.
|
||||
let max_start = u64::from(u32::MAX - num_docs.saturating_sub(1));
|
||||
let max_start = (u32::MAX - num_docs) as u64;
|
||||
let start: u64 = rand::rng().random_range(0..=max_start);
|
||||
let end = start + num_docs as u64;
|
||||
let values = start..end;
|
||||
|
||||
@@ -59,13 +59,11 @@ impl SchemaBuilder {
|
||||
|
||||
/// Adds a generated tie-breaker fast field.
|
||||
///
|
||||
/// The field is exposed as a `u64` fast field. Its generated values are temporarily limited
|
||||
/// to the `u32` range for downstream compatibility; this limit will eventually be lifted.
|
||||
/// Values supplied by documents for this field are ignored.
|
||||
/// The field is exposed as a `u64` fast field. Values are consecutive within a segment,
|
||||
/// starting at a random offset. Ranges of different segments may overlap, so values are
|
||||
/// almost always distinct but not guaranteed to be unique.
|
||||
///
|
||||
/// Values are consecutive within a segment, starting at a random offset. Ranges of
|
||||
/// different segments may overlap, so values are almost always distinct but not
|
||||
/// guaranteed to be unique.
|
||||
/// Values supplied by documents for this field are ignored.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user