mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-08 01:52:54 +00:00
issue/77 Added managed directory
This commit is contained in:
@@ -62,19 +62,7 @@ impl Segment {
|
||||
/// It just joins the segment id with the extension
|
||||
/// associated to a segment component.
|
||||
pub fn relative_path(&self, component: SegmentComponent) -> PathBuf {
|
||||
use self::SegmentComponent::*;
|
||||
let mut path = self.id().uuid_string();
|
||||
path.push_str(&*match component {
|
||||
POSITIONS => ".pos".to_string(),
|
||||
INFO => ".info".to_string(),
|
||||
POSTINGS => ".idx".to_string(),
|
||||
TERMS => ".term".to_string(),
|
||||
STORE => ".store".to_string(),
|
||||
FASTFIELDS => ".fast".to_string(),
|
||||
FIELDNORMS => ".fieldnorm".to_string(),
|
||||
DELETE => {format!(".{}.del", self.meta.delete_opstamp().unwrap_or(0))},
|
||||
});
|
||||
PathBuf::from(path)
|
||||
self.meta.relative_path(component)
|
||||
}
|
||||
|
||||
/// Open one of the component file for read.
|
||||
|
||||
Reference in New Issue
Block a user