You've already forked AstralRinth
forked from didirus/AstralRinth
Bump meilisearch version (#799)
This commit is contained in:
56
Cargo.lock
generated
56
Cargo.lock
generated
@@ -427,12 +427,6 @@ dependencies = [
|
|||||||
"password-hash 0.5.0",
|
"password-hash 0.5.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "arrayvec"
|
|
||||||
version = "0.5.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrayvec"
|
name = "arrayvec"
|
||||||
version = "0.7.4"
|
version = "0.7.4"
|
||||||
@@ -2208,12 +2202,12 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iso8601-duration"
|
name = "iso8601"
|
||||||
version = "0.1.0"
|
version = "0.6.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "60b51dd97fa24074214b9eb14da518957573f4dec3189112610ae1ccec9ac464"
|
checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nom 5.1.3",
|
"nom",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2404,26 +2398,13 @@ dependencies = [
|
|||||||
"idna 0.3.0",
|
"idna 0.3.0",
|
||||||
"mime",
|
"mime",
|
||||||
"native-tls",
|
"native-tls",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"quoted_printable",
|
"quoted_printable",
|
||||||
"socket2 0.4.10",
|
"socket2 0.4.10",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lexical-core"
|
|
||||||
version = "0.7.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
|
|
||||||
dependencies = [
|
|
||||||
"arrayvec 0.5.2",
|
|
||||||
"bitflags 1.3.2",
|
|
||||||
"cfg-if",
|
|
||||||
"ryu",
|
|
||||||
"static_assertions",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.150"
|
version = "0.2.150"
|
||||||
@@ -2601,9 +2582,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "meilisearch-index-setting-macro"
|
name = "meilisearch-index-setting-macro"
|
||||||
version = "0.22.1"
|
version = "0.24.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c9fedd7e2fabfbcc91679f3d76f6d648ea7fc9ea87c841b10d26c2a258f408da"
|
checksum = "b1f2124b55b9cb28e6a08b28854f4e834a51333cbdc2f72935f401efa686c13c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"convert_case 0.6.0",
|
"convert_case 0.6.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -2613,16 +2594,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "meilisearch-sdk"
|
name = "meilisearch-sdk"
|
||||||
version = "0.22.1"
|
version = "0.24.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8e6be928c91e1b23689725586b56f3284f394d93185accfa2771caec3e10015d"
|
checksum = "2257ea8ed24b079c21570f473e58cccc3de23b46cee331fc513fccdc3f1ae5a1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"either",
|
"either",
|
||||||
"futures",
|
"futures",
|
||||||
"futures-io",
|
"futures-io",
|
||||||
"isahc",
|
"isahc",
|
||||||
"iso8601-duration",
|
"iso8601",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"jsonwebtoken",
|
"jsonwebtoken",
|
||||||
"log",
|
"log",
|
||||||
@@ -2724,17 +2705,6 @@ dependencies = [
|
|||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom"
|
|
||||||
version = "5.1.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b"
|
|
||||||
dependencies = [
|
|
||||||
"lexical-core",
|
|
||||||
"memchr",
|
|
||||||
"version_check",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nom"
|
name = "nom"
|
||||||
version = "7.1.3"
|
version = "7.1.3"
|
||||||
@@ -3060,7 +3030,7 @@ dependencies = [
|
|||||||
"fnv",
|
"fnv",
|
||||||
"itertools 0.11.0",
|
"itertools 0.11.0",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"quick-xml 0.28.2",
|
"quick-xml 0.28.2",
|
||||||
"regex",
|
"regex",
|
||||||
"regex-cache",
|
"regex-cache",
|
||||||
@@ -3660,7 +3630,7 @@ version = "1.32.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd"
|
checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec 0.7.4",
|
"arrayvec",
|
||||||
"borsh",
|
"borsh",
|
||||||
"bytes",
|
"bytes",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
@@ -4246,7 +4216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85"
|
checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools 0.11.0",
|
"itertools 0.11.0",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"unicode_categories",
|
"unicode_categories",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ async-trait = "0.1.70"
|
|||||||
dashmap = "5.4.0"
|
dashmap = "5.4.0"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
|
|
||||||
meilisearch-sdk = "0.22.0"
|
meilisearch-sdk = "0.24.3"
|
||||||
rust-s3 = "0.33.0"
|
rust-s3 = "0.33.0"
|
||||||
reqwest = { version = "0.11.18", features = ["json", "multipart"] }
|
reqwest = { version = "0.11.18", features = ["json", "multipart"] }
|
||||||
hyper = { version = "0.14", features = ["full"] }
|
hyper = { version = "0.14", features = ["full"] }
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ services:
|
|||||||
POSTGRES_PASSWORD: labrinth
|
POSTGRES_PASSWORD: labrinth
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
meilisearch:
|
meilisearch:
|
||||||
image: getmeili/meilisearch:v1.0.1
|
image: getmeili/meilisearch:v1.5.0
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
ports:
|
ports:
|
||||||
- "7700:7700"
|
- "7700:7700"
|
||||||
volumes:
|
volumes:
|
||||||
- meilisearch-data:/meili_data
|
- meilisearch-data:/data.ms
|
||||||
environment:
|
environment:
|
||||||
MEILI_MASTER_KEY: modrinth
|
MEILI_MASTER_KEY: modrinth
|
||||||
redis:
|
redis:
|
||||||
|
|||||||
@@ -68,7 +68,11 @@ pub async fn loader_list(
|
|||||||
name: l.name,
|
name: l.name,
|
||||||
// Add generic 'project' type to all loaders, which is the v2 representation of
|
// Add generic 'project' type to all loaders, which is the v2 representation of
|
||||||
// a project type before any versions are set.
|
// 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<_>>();
|
.collect::<Vec<_>>();
|
||||||
Ok(HttpResponse::Ok().json(loaders))
|
Ok(HttpResponse::Ok().json(loaders))
|
||||||
|
|||||||
@@ -204,6 +204,8 @@ async fn create_or_update_index(
|
|||||||
} else {
|
} else {
|
||||||
old_settings.faceting
|
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
|
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.displayed_attributes != settings.displayed_attributes
|
||||||
|| old_settings.pagination != settings.pagination
|
|| old_settings.pagination != settings.pagination
|
||||||
|| old_settings.faceting != settings.faceting
|
|| old_settings.faceting != settings.faceting
|
||||||
|
|| old_settings.typo_tolerance != settings.typo_tolerance
|
||||||
|
|| old_settings.dictionary != settings.dictionary
|
||||||
{
|
{
|
||||||
info!("Performing index settings set.");
|
info!("Performing index settings set.");
|
||||||
index
|
index
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ pub struct SearchConfig {
|
|||||||
|
|
||||||
impl SearchConfig {
|
impl SearchConfig {
|
||||||
pub fn make_client(&self) -> Client {
|
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,
|
info: &SearchRequest,
|
||||||
config: &SearchConfig,
|
config: &SearchConfig,
|
||||||
) -> Result<SearchResults, SearchError> {
|
) -> 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 offset = info.offset.as_deref().unwrap_or("0").parse()?;
|
||||||
let index = info.index.as_deref().unwrap_or("relevance");
|
let index = info.index.as_deref().unwrap_or("relevance");
|
||||||
|
|||||||
Reference in New Issue
Block a user