mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-15 13:32:56 +00:00
Exposing the remaining API
This commit is contained in:
@@ -70,6 +70,10 @@ impl SegmentReader {
|
||||
self.segment_meta.num_docs()
|
||||
}
|
||||
|
||||
pub fn schema(&self) -> &Schema {
|
||||
&self.schema
|
||||
}
|
||||
|
||||
/// Return the number of documents that have been
|
||||
/// deleted in the segment.
|
||||
pub fn num_deleted_docs(&self) -> DocId {
|
||||
|
||||
@@ -244,3 +244,8 @@ impl FastFieldsReader {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for U64FastFieldReader {}
|
||||
unsafe impl Sync for U64FastFieldReader {}
|
||||
unsafe impl Send for I64FastFieldReader {}
|
||||
unsafe impl Sync for I64FastFieldReader {}
|
||||
@@ -346,6 +346,18 @@ impl IndexWriter {
|
||||
result
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub fn add_segment(&mut self, segment_meta: SegmentMeta) {
|
||||
let delete_cursor = self.delete_queue.cursor();
|
||||
let segment_entry = SegmentEntry::new(segment_meta, delete_cursor, None);
|
||||
self.segment_updater.add_segment(self.generation, segment_entry);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub fn new_segment(&self) -> Segment {
|
||||
self.segment_updater.new_segment()
|
||||
}
|
||||
|
||||
/// Spawns a new worker thread for indexing.
|
||||
/// The thread consumes documents from the pipeline.
|
||||
///
|
||||
|
||||
12
src/lib.rs
12
src/lib.rs
@@ -90,22 +90,25 @@ pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
mod core;
|
||||
mod compression;
|
||||
mod store;
|
||||
mod indexer;
|
||||
mod common;
|
||||
pub mod common;
|
||||
mod error;
|
||||
mod analyzer;
|
||||
mod datastruct;
|
||||
|
||||
|
||||
|
||||
pub mod termdict;
|
||||
|
||||
// Row-oriented, slow, compressed storage of documents
|
||||
pub mod store;
|
||||
|
||||
/// Query module
|
||||
pub mod query;
|
||||
|
||||
pub mod directory;
|
||||
|
||||
/// Collector module
|
||||
pub mod collector;
|
||||
|
||||
/// Postings module (also called inverted index)
|
||||
pub mod postings;
|
||||
/// Schema
|
||||
@@ -123,6 +126,7 @@ pub use self::common::TimerTree;
|
||||
|
||||
pub use postings::DocSet;
|
||||
pub use postings::Postings;
|
||||
pub use core::SegmentComponent;
|
||||
pub use postings::SegmentPostingsOption;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user