Expose a function to be able to now the status of an update

This commit is contained in:
Clément Renault 2019-10-08 17:35:47 +02:00
parent 6534a9ec1d
commit 2a4707d51e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 15 additions and 0 deletions

View File

@ -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};

View File

@ -133,6 +133,20 @@ impl Index {
)
}
pub fn update_status<T: rkv::Readable>(
&self,
reader: &T,
update_id: u64,
) -> MResult<update::UpdateStatus>
{
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)
}