Expose memory usage in SingleSegmentIndexWriter (#1508)

This commit is contained in:
Paul Masurel
2022-09-07 18:33:52 +09:00
committed by GitHub
parent 1f3d8ca7e2
commit 4d634d61ff

View File

@@ -21,6 +21,10 @@ impl SingleSegmentIndexWriter {
})
}
pub fn mem_usage(&self) -> usize {
self.segment_writer.mem_usage()
}
pub fn add_document(&mut self, document: Document) -> crate::Result<()> {
let opstamp = self.opstamp;
self.opstamp += 1;