Bump meilisearch version (#799)

This commit is contained in:
Geometrically
2023-12-12 21:04:40 -07:00
committed by GitHub
parent abbeed394e
commit c0c5978028
6 changed files with 27 additions and 49 deletions

View File

@@ -68,7 +68,11 @@ pub async fn loader_list(
name: l.name,
// Add generic 'project' type to all loaders, which is the v2 representation of
// a project type before any versions are set.
supported_project_types: l.supported_project_types.into_iter().chain(std::iter::once("project".to_string())).collect(),
supported_project_types: l
.supported_project_types
.into_iter()
.chain(std::iter::once("project".to_string()))
.collect(),
})
.collect::<Vec<_>>();
Ok(HttpResponse::Ok().json(loaders))

View File

@@ -204,6 +204,8 @@ async fn create_or_update_index(
} else {
old_settings.faceting
},
typo_tolerance: None, // We don't use typo tolerance right now
dictionary: None, // We don't use dictionary right now
};
if old_settings.synonyms != settings.synonyms
@@ -216,6 +218,8 @@ async fn create_or_update_index(
|| old_settings.displayed_attributes != settings.displayed_attributes
|| old_settings.pagination != settings.pagination
|| old_settings.faceting != settings.faceting
|| old_settings.typo_tolerance != settings.typo_tolerance
|| old_settings.dictionary != settings.dictionary
{
info!("Performing index settings set.");
index

View File

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