From 2a4707d51e76114f23fff89b35972db409b9fc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 8 Oct 2019 17:35:47 +0200 Subject: [PATCH] Expose a function to be able to now the status of an update --- meilidb-core/src/lib.rs | 1 + meilidb-core/src/store/mod.rs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/meilidb-core/src/lib.rs b/meilidb-core/src/lib.rs index 86162b20b..034bf4f1a 100644 --- a/meilidb-core/src/lib.rs +++ b/meilidb-core/src/lib.rs @@ -21,6 +21,7 @@ pub use self::number::{Number, ParseNumberError}; pub use self::ranked_map::RankedMap; pub use self::raw_document::RawDocument; pub use self::store::Index; +pub use self::update::UpdateStatus; use zerocopy::{AsBytes, FromBytes}; use ::serde::{Serialize, Deserialize}; diff --git a/meilidb-core/src/store/mod.rs b/meilidb-core/src/store/mod.rs index 15b1083bb..8eb108b75 100644 --- a/meilidb-core/src/store/mod.rs +++ b/meilidb-core/src/store/mod.rs @@ -133,6 +133,20 @@ impl Index { ) } + pub fn update_status( + &self, + reader: &T, + update_id: u64, + ) -> MResult + { + update::update_status( + reader, + self.updates, + self.updates_results, + update_id, + ) + } + pub fn query_builder(&self) -> QueryBuilder { QueryBuilder::new(self.main, self.postings_lists, self.synonyms) }