mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
implements the index deletion, creation and swap
This commit is contained in:
parent
fa27485070
commit
b1f0431ab4
4 changed files with 70 additions and 7 deletions
|
@ -137,6 +137,13 @@ pub mod test {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn delete(self) -> Result<()> {
|
||||
match self {
|
||||
MockIndex::Real(index) => index.delete(),
|
||||
MockIndex::Mock(m) => unsafe { m.get("delete").call(()) },
|
||||
}
|
||||
}
|
||||
|
||||
pub fn perform_search(&self, query: SearchQuery) -> Result<SearchResult> {
|
||||
match self {
|
||||
MockIndex::Real(index) => index.perform_search(query),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue