mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 09:12:55 +00:00
28 lines
603 B
Rust
28 lines
603 B
Rust
use schema::Schema;
|
|
use core::SegmentMeta;
|
|
|
|
/// Meta information about the `Index`.
|
|
///
|
|
/// This object is serialized on disk in the `meta.json` file.
|
|
/// It keeps information about
|
|
/// * the searchable segments,
|
|
/// * the index `docstamp`
|
|
/// * the schema
|
|
///
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct IndexMeta {
|
|
pub segments: Vec<SegmentMeta>,
|
|
pub schema: Schema,
|
|
pub opstamp: u64,
|
|
}
|
|
|
|
impl IndexMeta {
|
|
pub fn with_schema(schema: Schema) -> IndexMeta {
|
|
IndexMeta {
|
|
segments: vec![],
|
|
schema,
|
|
opstamp: 0u64,
|
|
}
|
|
}
|
|
}
|