From 6f1c30b247a7f58eb556135c45d40f5cd9e1c7a9 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 7 Dec 2022 18:22:36 +0100 Subject: [PATCH 1/2] Fix the instance-uid in the data.ms We were writing the instance-uid as bytes instead of string in the data.ms and thus we were unable to parse it later. Also it was less practical for our user to retrieve it and send it to us. --- meilisearch/src/analytics/segment_analytics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch/src/analytics/segment_analytics.rs b/meilisearch/src/analytics/segment_analytics.rs index a8fe9fead..880d34c9a 100644 --- a/meilisearch/src/analytics/segment_analytics.rs +++ b/meilisearch/src/analytics/segment_analytics.rs @@ -39,7 +39,7 @@ const ANALYTICS_HEADER: &str = "X-Meilisearch-Client"; /// Write the instance-uid in the `data.ms` and in `~/.config/MeiliSearch/path-to-db-instance-uid`. Ignore the errors. fn write_user_id(db_path: &Path, user_id: &InstanceUid) { - let _ = fs::write(db_path.join("instance-uid"), user_id.as_bytes()); + let _ = fs::write(db_path.join("instance-uid"), user_id.to_string()); if let Some((meilisearch_config_path, user_id_path)) = MEILISEARCH_CONFIG_PATH.as_ref().zip(config_user_id_path(db_path)) { From 4631f4d97f1042dd1a80fd8e461356392230cd50 Mon Sep 17 00:00:00 2001 From: curquiza Date: Thu, 8 Dec 2022 13:23:44 +0100 Subject: [PATCH 2/2] Bump milli to v0.37.2 --- Cargo.lock | 16 ++++++++-------- meilisearch-types/Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f824f785c..ac3a1aeef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1332,8 +1332,8 @@ dependencies = [ [[package]] name = "filter-parser" -version = "0.37.1" -source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.1#e1b2113cd9a467410841a254286e5e25961af43e" +version = "0.37.2" +source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.2#1582b96119fedad39c726a6d4aeda0f53e868a3b" dependencies = [ "nom", "nom_locate", @@ -1351,8 +1351,8 @@ dependencies = [ [[package]] name = "flatten-serde-json" -version = "0.37.1" -source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.1#e1b2113cd9a467410841a254286e5e25961af43e" +version = "0.37.2" +source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.2#1582b96119fedad39c726a6d4aeda0f53e868a3b" dependencies = [ "serde_json", ] @@ -1898,8 +1898,8 @@ dependencies = [ [[package]] name = "json-depth-checker" -version = "0.37.1" -source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.1#e1b2113cd9a467410841a254286e5e25961af43e" +version = "0.37.2" +source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.2#1582b96119fedad39c726a6d4aeda0f53e868a3b" dependencies = [ "serde_json", ] @@ -2417,8 +2417,8 @@ dependencies = [ [[package]] name = "milli" -version = "0.37.1" -source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.1#e1b2113cd9a467410841a254286e5e25961af43e" +version = "0.37.2" +source = "git+https://github.com/meilisearch/milli.git?tag=v0.37.2#1582b96119fedad39c726a6d4aeda0f53e868a3b" dependencies = [ "bimap", "bincode", diff --git a/meilisearch-types/Cargo.toml b/meilisearch-types/Cargo.toml index edbc05a8c..1d136c2c1 100644 --- a/meilisearch-types/Cargo.toml +++ b/meilisearch-types/Cargo.toml @@ -12,7 +12,7 @@ either = { version = "1.6.1", features = ["serde"] } enum-iterator = "1.1.3" flate2 = "1.0.24" fst = "0.4.7" -milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.37.1", default-features = false } +milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.37.2", default-features = false } proptest = { version = "1.0.0", optional = true } proptest-derive = { version = "0.3.0", optional = true } roaring = { version = "0.10.0", features = ["serde"] }