mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-03 09:00:42 +00:00
32 lines
969 B
Rust
32 lines
969 B
Rust
#[derive(Copy, Clone)]
|
|
pub enum SegmentComponent {
|
|
INFO,
|
|
POSTINGS,
|
|
POSITIONS,
|
|
FASTFIELDS,
|
|
FIELDNORMS,
|
|
TERMS,
|
|
STORE,
|
|
DELETE(u64), //< The argument here is an opstamp.
|
|
// All of the deletes with an opstamp smaller or equal
|
|
// to this opstamp have been taken in account.
|
|
}
|
|
|
|
impl SegmentComponent {
|
|
|
|
pub fn path_suffix(&self)-> String {
|
|
match *self {
|
|
SegmentComponent::POSITIONS => ".pos".to_string(),
|
|
SegmentComponent::INFO => ".info".to_string(),
|
|
SegmentComponent::POSTINGS => ".idx".to_string(),
|
|
SegmentComponent::TERMS => ".term".to_string(),
|
|
SegmentComponent::STORE => ".store".to_string(),
|
|
SegmentComponent::FASTFIELDS => ".fast".to_string(),
|
|
SegmentComponent::FIELDNORMS => ".fieldnorm".to_string(),
|
|
SegmentComponent::DELETE(opstamp) => format!("{}.del", opstamp)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|