mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
implement search and fix document addition
This commit is contained in:
parent
658166c05e
commit
c4dfd5f0c3
9 changed files with 842 additions and 33 deletions
|
@ -13,6 +13,8 @@ use milli::update::{IndexDocumentsMethod, UpdateFormat, DocumentAdditionResult};
|
|||
use serde::{Serialize, Deserialize, de::Deserializer};
|
||||
use uuid::Uuid;
|
||||
use tokio::fs::File;
|
||||
use crate::data::SearchResult;
|
||||
use crate::data::SearchQuery;
|
||||
|
||||
pub use updates::{Processed, Processing, Failed};
|
||||
|
||||
|
@ -135,6 +137,8 @@ pub trait IndexController {
|
|||
primary_key: Option<String>,
|
||||
) -> anyhow::Result<UpdateStatus>;
|
||||
|
||||
async fn search(&self, name: String, query: SearchQuery) -> Result<SearchResult>;
|
||||
|
||||
/// Clear all documents in the given index.
|
||||
fn clear_documents(&self, index: String) -> anyhow::Result<UpdateStatus>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue