Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Bump meilisearch version #799

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 13 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async-trait = "0.1.70"
dashmap = "5.4.0"
lazy_static = "1.4.0"

meilisearch-sdk = "0.22.0"
meilisearch-sdk = "0.24.3"
rust-s3 = "0.33.0"
reqwest = { version = "0.11.18", features = ["json", "multipart"] }
hyper = { version = "0.14", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ services:
POSTGRES_PASSWORD: labrinth
POSTGRES_HOST_AUTH_METHOD: trust
meilisearch:
image: getmeili/meilisearch:v1.0.1
image: getmeili/meilisearch:v1.5.0
restart: on-failure
ports:
- "7700:7700"
volumes:
- meilisearch-data:/meili_data
- meilisearch-data:/data.ms
environment:
MEILI_MASTER_KEY: modrinth
redis:
Expand Down
6 changes: 5 additions & 1 deletion src/routes/v2/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions src/search/indexing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/search/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
}

Expand Down Expand Up @@ -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");
Expand Down
Loading