Bump meilisearch version

This commit is contained in:
Jai A
2024-12-30 20:55:37 -07:00
parent bb3de4b74b
commit 17d61277fa
5 changed files with 55 additions and 138 deletions

View File

@@ -80,7 +80,9 @@ impl SearchConfig {
}
}
pub fn make_client(&self) -> Client {
pub fn make_client(
&self,
) -> Result<Client, meilisearch_sdk::errors::Error> {
Client::new(self.address.as_str(), Some(self.key.as_str()))
}
@@ -190,7 +192,7 @@ pub async fn search_for_project(
info: &SearchRequest,
config: &SearchConfig,
) -> Result<SearchResults, SearchError> {
let client = Client::new(&*config.address, Some(&*config.key));
let client = Client::new(&*config.address, Some(&*config.key))?;
let offset: usize = info.offset.as_deref().unwrap_or("0").parse()?;
let index = info.index.as_deref().unwrap_or("relevance");