Expose inner file slice

This commit is contained in:
boraarslan
2022-08-04 18:13:17 +03:00
parent d5ee4edf25
commit d4b2b7de8b
2 changed files with 7 additions and 1 deletions

View File

@@ -128,7 +128,8 @@ impl SegmentReader {
})
}
pub(crate) fn fieldnorms_readers(&self) -> &FieldNormReaders {
#[doc(hidden)]
pub fn fieldnorms_readers(&self) -> &FieldNormReaders {
&self.fieldnorm_readers
}

View File

@@ -40,6 +40,11 @@ impl FieldNormReaders {
pub fn space_usage(&self) -> PerFieldSpaceUsage {
self.data.space_usage()
}
/// Returns a handle to inner file
pub fn get_inner_file(&self) -> Arc<CompositeFile> {
self.data.clone()
}
}
/// Reads the fieldnorm associated to a document.