From 0286ecea09bc402d1712edb55f5f189248930156 Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Fri, 14 Apr 2023 11:13:48 +0200 Subject: [PATCH] re-export a few sstable functions on dicitonary (#1996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * re-export a few sstable functions on dicitonary * Update documentation Co-authored-by: François Massot --------- Co-authored-by: François Massot --- src/termdict/mod.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/termdict/mod.rs b/src/termdict/mod.rs index 8fb903a6b..541fa4e93 100644 --- a/src/termdict/mod.rs +++ b/src/termdict/mod.rs @@ -149,6 +149,23 @@ impl TermDictionary { pub async fn get_async>(&self, key: K) -> io::Result> { self.0.get_async(key).await } + + #[cfg(feature = "quickwit")] + #[doc(hidden)] + pub async fn warm_up_dictionary(&self) -> io::Result<()> { + self.0.warm_up_dictionary().await + } + + #[cfg(feature = "quickwit")] + /// Returns a file slice covering a set of sstable blocks + /// that includes the key range passed in arguments. + pub fn file_slice_for_range( + &self, + key_range: impl std::ops::RangeBounds<[u8]>, + limit: Option, + ) -> FileSlice { + self.0.file_slice_for_range(key_range, limit) + } } /// A TermDictionaryBuilder wrapping either an FST or a SSTable dictionary builder.