mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-29 06:30:41 +00:00
add index accessor for index writer (#1159)
* add index accessor for index writer * Update src/indexer/index_writer.rs Co-authored-by: Paul Masurel <paul@quickwit.io>
This commit is contained in:
@@ -348,6 +348,13 @@ impl IndexWriter {
|
||||
self.operation_sender = sender;
|
||||
}
|
||||
|
||||
/// Accessor to the index
|
||||
///
|
||||
/// The index is actually cloned.
|
||||
pub fn index(&self) -> &Index {
|
||||
&self.index
|
||||
}
|
||||
|
||||
/// If there are some merging threads, blocks until they all finish their work and
|
||||
/// then drop the `IndexWriter`.
|
||||
pub fn wait_merging_threads(mut self) -> crate::Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user