From 6ee0d72c7bc464547b1d8bd9149d09ae9945fab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 8 Oct 2019 17:18:22 +0200 Subject: [PATCH] Expose the synonyms operation updates on the Index --- meilidb-core/src/store/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meilidb-core/src/store/mod.rs b/meilidb-core/src/store/mod.rs index 66cbdc695..15b1083bb 100644 --- a/meilidb-core/src/store/mod.rs +++ b/meilidb-core/src/store/mod.rs @@ -117,6 +117,22 @@ impl Index { ) } + pub fn synonyms_addition(&self) -> update::SynonymsAddition { + update::SynonymsAddition::new( + self.updates, + self.updates_results, + self.updates_notifier.clone(), + ) + } + + pub fn synonyms_deletion(&self) -> update::SynonymsDeletion { + update::SynonymsDeletion::new( + self.updates, + self.updates_results, + self.updates_notifier.clone(), + ) + } + pub fn query_builder(&self) -> QueryBuilder { QueryBuilder::new(self.main, self.postings_lists, self.synonyms) }