From e271395971155228c070bb630e72ec85df867ca6 Mon Sep 17 00:00:00 2001 From: Sai Kumar Date: Wed, 16 Mar 2022 18:15:58 +0530 Subject: [PATCH] chore(all): bump milli * updates to Use the milli's heed dependency #2210 * Update index.rs * Update store.rs * Update mod.rs * cargo fmt --- Cargo.lock | 626 ++++++++++++++---- meilisearch-auth/Cargo.toml | 2 +- meilisearch-auth/src/error.rs | 2 +- meilisearch-auth/src/store.rs | 10 +- meilisearch-http/Cargo.toml | 2 +- meilisearch-http/src/helpers/env.rs | 2 +- meilisearch-lib/Cargo.toml | 3 +- meilisearch-lib/src/index/dump.rs | 2 +- meilisearch-lib/src/index/error.rs | 2 +- meilisearch-lib/src/index/index.rs | 8 +- meilisearch-lib/src/index/updates.rs | 2 +- .../src/index_controller/dump_actor/error.rs | 2 +- .../index_controller/dump_actor/loaders/v4.rs | 2 +- meilisearch-lib/src/index_controller/mod.rs | 4 +- meilisearch-lib/src/index_resolver/error.rs | 2 +- .../src/index_resolver/meta_store.rs | 8 +- meilisearch-lib/src/index_resolver/mod.rs | 4 +- meilisearch-lib/src/lib.rs | 2 +- meilisearch-lib/src/snapshot.rs | 8 +- meilisearch-lib/src/tasks/error.rs | 2 +- meilisearch-lib/src/tasks/task_store/mod.rs | 6 +- meilisearch-lib/src/tasks/task_store/store.rs | 32 +- 22 files changed, 532 insertions(+), 201 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 815fdf3b4..48efe3aee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,11 +21,10 @@ dependencies = [ [[package]] name = "actix-cors" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30dbd116ef7532f56e2f6d7c511736ea0b124d914ee8820a5271247bf89f06aa" +checksum = "414360eed71ba2d5435b185ba43ecbe281dfab5df3898286d6b7be8074372c92" dependencies = [ - "actix-service", "actix-utils", "actix-web", "derive_more", @@ -37,9 +36,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.0.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3fdd63b9cfeaf92eeeece719dabbddddb420a57d3fd171ce1490ecfb7086b1" +checksum = "a5885cb81a0d4d0d322864bea1bb6c2a8144626b4fdc625d4c51eba197e7797a" dependencies = [ "actix-codec", "actix-rt", @@ -80,7 +79,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -99,9 +98,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf3f2183be1241ed4dd22611850b85d38de0b08a09f1f7bcccbd0809084b359" +checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" dependencies = [ "actix-macros", "futures-core", @@ -110,20 +109,20 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e7472ac180abb0a8e592b653744345983a7a14f44691c8394a799d0df4dbbf" +checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" dependencies = [ "actix-rt", "actix-service", "actix-utils", "futures-core", "futures-util", - "log", "mio", "num_cpus", "socket2", "tokio", + "tracing", ] [[package]] @@ -215,7 +214,7 @@ dependencies = [ "actix-router", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -287,9 +286,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.55" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd" +checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" dependencies = [ "backtrace", ] @@ -330,9 +329,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" dependencies = [ "async-stream-impl", "futures-core", @@ -340,13 +339,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -357,7 +356,7 @@ checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -500,6 +499,12 @@ dependencies = [ "serde", ] +[[package]] +name = "build_const" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7" + [[package]] name = "bumpalo" version = "3.9.1" @@ -508,9 +513,9 @@ checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "byte-unit" -version = "4.0.13" +version = "4.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ffc5b0ec7d7a6949e3f21fd63ba5af4cffdc2ba1e0b7bf62b481458c4ae7f" +checksum = "95ebf10dda65f19ff0f42ea15572a359ed60d7fc74fdc984d90310937be0014b" dependencies = [ "serde", "utf8-width", @@ -524,9 +529,9 @@ checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" [[package]] name = "bytemuck" -version = "1.7.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439989e6b8c38d1b6570a384ef1e49c8848128f5a97f3914baef02920842712f" +checksum = "0e851ca7c24871e7336801608a4797d7376545b6928a10d32d75685687141ead" dependencies = [ "bytemuck_derive", ] @@ -539,7 +544,7 @@ checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -653,15 +658,15 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time 0.1.44", + "time 0.1.43", "winapi", ] [[package]] name = "clap" -version = "3.1.2" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5177fac1ab67102d8989464efd043c6ff44191b1557ec1ddd489b4f7e1447e77" +checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" dependencies = [ "atty", "bitflags", @@ -676,15 +681,15 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.2" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d42c94ce7c2252681b5fed4d3627cc807b13dfc033246bd05d5b252399000e" +checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" dependencies = [ "heck", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -695,7 +700,7 @@ checksum = "1df715824eb382e34b7afb7463b0247bf41538aeba731fba05241ecdb5dc3747" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -715,6 +720,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.3" @@ -736,6 +751,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +dependencies = [ + "build_const", +] + [[package]] name = "crc32fast" version = "1.3.2" @@ -747,12 +771,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" +checksum = "fdbfe11fe19ff083c48923cf179540e8cd0535903dc35e178a1fdeeb59aef51f" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", ] [[package]] @@ -763,17 +787,18 @@ checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", ] [[package]] name = "crossbeam-epoch" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ + "autocfg", "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", "lazy_static", "memoffset", "scopeguard", @@ -800,9 +825,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -848,7 +873,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -861,7 +886,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", "rustc_version", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -928,6 +953,70 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "encoding" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +dependencies = [ + "encoding-index-japanese", + "encoding-index-korean", + "encoding-index-simpchinese", + "encoding-index-singlebyte", + "encoding-index-tradchinese", +] + +[[package]] +name = "encoding-index-japanese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-korean" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-simpchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-singlebyte" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-tradchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding_index_tests" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" + [[package]] name = "encoding_rs" version = "0.8.30" @@ -954,7 +1043,7 @@ checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -994,9 +1083,9 @@ dependencies = [ [[package]] name = "filter-parser" version = "0.1.0" -source = "git+https://github.com/meilisearch/milli.git?tag=v0.22.2#f2984f66e64838d51f5cce412693fa411ee3f2d4" +source = "git+https://github.com/meilisearch/milli.git?tag=v0.24.0#5863afa1a568950de2928ba2d78b95aee243dad1" dependencies = [ - "nom 7.1.0", + "nom 7.1.1", "nom_locate", ] @@ -1033,6 +1122,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.0.1" @@ -1117,7 +1221,7 @@ checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -1201,7 +1305,7 @@ checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] @@ -1213,7 +1317,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -1224,9 +1328,9 @@ checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "git2" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94781080dd1a6b55dea7c46540d5bac87742a22f6dc2d84e54a5071ad6f0e387" +checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c" dependencies = [ "bitflags", "libc", @@ -1243,9 +1347,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "grenad" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7a9cc43b28a20f791b17863f34a36654fdfa50be6d0a67bb18c1e34d145f18" +checksum = "1d69e46e7b225459e2e0272707d167d7dcaaac89307a848326df6b30ec432151" dependencies = [ "bytemuck", "byteorder", @@ -1254,9 +1358,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" +checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b" dependencies = [ "bytes", "fnv", @@ -1317,7 +1421,7 @@ checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "heed" version = "0.12.1" -source = "git+https://github.com/Kerollmops/heed?tag=v0.12.1#fc017cf3394af737f92fd71e16f0499a78b79d65" +source = "git+https://github.com/meilisearch/heed?tag=v0.12.1#fc017cf3394af737f92fd71e16f0499a78b79d65" dependencies = [ "byteorder", "heed-traits", @@ -1326,7 +1430,6 @@ dependencies = [ "lmdb-rkv-sys", "once_cell", "page_size", - "serde", "synchronoise", "url", "zerocopy", @@ -1335,12 +1438,12 @@ dependencies = [ [[package]] name = "heed-traits" version = "0.7.0" -source = "git+https://github.com/Kerollmops/heed?tag=v0.12.1#fc017cf3394af737f92fd71e16f0499a78b79d65" +source = "git+https://github.com/meilisearch/heed?tag=v0.12.1#fc017cf3394af737f92fd71e16f0499a78b79d65" [[package]] name = "heed-types" version = "0.7.2" -source = "git+https://github.com/Kerollmops/heed?tag=v0.12.1#fc017cf3394af737f92fd71e16f0499a78b79d65" +source = "git+https://github.com/meilisearch/heed?tag=v0.12.1#fc017cf3394af737f92fd71e16f0499a78b79d65" dependencies = [ "bincode", "heed-traits", @@ -1398,12 +1501,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "human_format" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86cce260d758a9aa3d7c4b99d55c815a540f8a37514ba6046ab6be402a157cb0" - [[package]] name = "humantime" version = "2.1.0" @@ -1447,6 +1544,19 @@ dependencies = [ "tokio-rustls", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "idna" version = "0.2.3" @@ -1480,9 +1590,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" [[package]] name = "iso8601-duration" @@ -1597,15 +1707,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.119" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "ad5c14e80759d0939d013e6ca49930e59fc53dd8e5009132f76240c179380c09" [[package]] name = "libgit2-sys" -version = "0.13.0+1.4.1" +version = "0.13.2+1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864e22fc06cae62860398cd854c93d5867f11c02ec916aa1417b440f170df23a" +checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b" dependencies = [ "cc", "libc", @@ -1615,9 +1725,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" dependencies = [ "cc", "libc", @@ -1626,10 +1736,100 @@ dependencies = [ ] [[package]] -name = "linked-hash-map" -version = "0.5.4" +name = "lindera" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "29719eff479c5d34182dd16c708a413790106b790aa25f5e2f57ae6730715e69" +dependencies = [ + "anyhow", + "bincode", + "byteorder", + "encoding", + "lindera-core", + "lindera-dictionary", + "lindera-ipadic", + "lindera-ipadic-builder", + "serde", + "serde_json", +] + +[[package]] +name = "lindera-core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bc4dc99a35081246649b978d212c2c8d6b9adf8171c14bed844ad9c6475af45" +dependencies = [ + "anyhow", + "bincode", + "byteorder", + "encoding", + "log", + "serde", + "thiserror", + "yada", +] + +[[package]] +name = "lindera-decompress" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc8e3d628f7d94c84fa864741b35172ea6b87d2a6efb37f7bca41532b952c24d" +dependencies = [ + "anyhow", + "bincode", + "lzma-rs", + "serde", +] + +[[package]] +name = "lindera-dictionary" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "632f75733b3b366a0079ee5fb70215b706c1986dcebddfd5db95849b32e6e694" +dependencies = [ + "anyhow", + "bincode", + "byteorder", + "lindera-core", +] + +[[package]] +name = "lindera-ipadic" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71878006e14474ae3aa7265c4dc5bb9db861e42ba8df9a254e0b5c746cccbd4" +dependencies = [ + "bincode", + "byteorder", + "encoding", + "flate2", + "lindera-core", + "lindera-ipadic-builder", + "once_cell", + "reqwest", + "tar", + "tokio", +] + +[[package]] +name = "lindera-ipadic-builder" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd441a227cbf9b9a9708b01e45e47fe9fde0f7cf8d10639baf59b1696cf2971f" +dependencies = [ + "anyhow", + "bincode", + "byteorder", + "clap", + "encoding", + "env_logger", + "glob", + "lindera-core", + "lindera-decompress", + "log", + "serde", + "yada", +] [[package]] name = "lmdb-rkv-sys" @@ -1696,7 +1896,17 @@ dependencies = [ "log", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", +] + +[[package]] +name = "lzma-rs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aba8ecb0450dfabce4ad72085eed0a75dffe8f21f7ada05638564ea9db2d7fb1" +dependencies = [ + "byteorder", + "crc", ] [[package]] @@ -1716,8 +1926,8 @@ name = "meilisearch-auth" version = "0.26.0" dependencies = [ "enum-iterator", - "heed", "meilisearch-error", + "milli", "rand", "serde", "serde_json", @@ -1762,7 +1972,6 @@ dependencies = [ "fst", "futures", "futures-util", - "heed", "hex", "http", "indexmap", @@ -1774,6 +1983,7 @@ dependencies = [ "meilisearch-auth", "meilisearch-error", "meilisearch-lib", + "milli", "mime", "num_cpus", "obkv", @@ -1787,7 +1997,7 @@ dependencies = [ "regex", "reqwest", "rustls 0.20.4", - "rustls-pemfile", + "rustls-pemfile 0.2.1", "segment", "serde", "serde_json", @@ -1795,7 +2005,7 @@ dependencies = [ "sha-1 0.9.8", "sha2", "siphasher", - "slice-group-by", + "slice-group-by 0.2.6", "static-files", "sysinfo", "tar", @@ -1834,7 +2044,6 @@ dependencies = [ "fst", "futures", "futures-util", - "heed", "http", "indexmap", "itertools", @@ -1862,7 +2071,7 @@ dependencies = [ "serde", "serde_json", "siphasher", - "slice-group-by", + "slice-group-by 0.2.6", "sysinfo", "tar", "tempfile", @@ -1876,16 +2085,18 @@ dependencies = [ [[package]] name = "meilisearch-tokenizer" -version = "0.2.7" -source = "git+https://github.com/meilisearch/tokenizer.git?tag=v0.2.7#e14f64f2482d8f57e9aae8dc37dcb1469099f6f3" +version = "0.2.8" +source = "git+https://github.com/meilisearch/tokenizer.git?tag=v0.2.8#afd1097bdb389d0528fee7cd5167d0b68ca922a0" dependencies = [ "character_converter", "cow-utils", "deunicode", "fst", "jieba-rs", + "lindera", + "lindera-core", "once_cell", - "slice-group-by", + "slice-group-by 0.3.0", "unicode-segmentation", "whatlang", ] @@ -1916,8 +2127,8 @@ dependencies = [ [[package]] name = "milli" -version = "0.23.0" -source = "git+https://github.com/meilisearch/milli.git?tag=v0.22.2#f2984f66e64838d51f5cce412693fa411ee3f2d4" +version = "0.23.1" +source = "git+https://github.com/meilisearch/milli.git?tag=v0.24.0#5863afa1a568950de2928ba2d78b95aee243dad1" dependencies = [ "bimap", "bincode", @@ -1928,16 +2139,13 @@ dependencies = [ "csv", "either", "filter-parser", - "flate2", "fst", "fxhash", "geoutils", "grenad", "heed", - "human_format", "itertools", "levenshtein_automata", - "linked-hash-map", "log", "logging_timer", "meilisearch-tokenizer", @@ -1950,7 +2158,7 @@ dependencies = [ "rstar", "serde", "serde_json", - "slice-group-by", + "slice-group-by 0.3.0", "smallstr", "smallvec", "tempfile", @@ -1992,14 +2200,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2" +checksum = "7ba42135c6a5917b9db9cd7b293e5409e1c6b041e6f9825e92e55a894c63b6f8" dependencies = [ "libc", "log", "miow", "ntapi", + "wasi 0.11.0+wasi-snapshot-preview1", "winapi", ] @@ -2036,7 +2245,25 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", +] + +[[package]] +name = "native-tls" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] @@ -2057,13 +2284,12 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ "memchr", "minimal-lexical", - "version_check", ] [[package]] @@ -2074,7 +2300,7 @@ checksum = "37794436ca3029a3089e0b95d42da1f0b565ad271e4d3bb4bad0c7bb70b10605" dependencies = [ "bytecount", "memchr", - "nom 7.1.0", + "nom 7.1.1", ] [[package]] @@ -2134,9 +2360,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +checksum = "c539a50b93a303167eded6e8dff5220cd39447409fb659f4cd24b1f72fe4f133" dependencies = [ "libc", ] @@ -2158,9 +2384,9 @@ checksum = "f69e48cd7c8e5bb52a1da1287fdbfd877c32673176583ce664cd63b201aba385" [[package]] name = "once_cell" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" [[package]] name = "opaque-debug" @@ -2168,6 +2394,39 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-sys", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "ordered-float" version = "2.10.0" @@ -2343,7 +2602,7 @@ checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -2417,7 +2676,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", "version_check", ] @@ -2570,16 +2829,16 @@ checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" dependencies = [ "bitflags", ] @@ -2596,9 +2855,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ "aho-corasick", "memchr", @@ -2628,9 +2887,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.9" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" +checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64 0.13.0", "bytes", @@ -2642,19 +2901,22 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "lazy_static", "log", "mime", + "native-tls", "percent-encoding", "pin-project-lite", "rustls 0.20.4", - "rustls-pemfile", + "rustls-pemfile 0.3.0", "serde", "serde_json", "serde_urlencoded", "tokio", + "tokio-native-tls", "tokio-rustls", "url", "wasm-bindgen", @@ -2687,9 +2949,9 @@ dependencies = [ [[package]] name = "roaring" -version = "0.6.7" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "536cfa885fc388b8ae69edf96d7970849b7d9c1395da1b8330f17715babf8a09" +checksum = "dd539cab4e32019956fe7e0cf160bb6d4802f4be2b52c4253d76d3bb0f85a5f7" dependencies = [ "bytemuck", "byteorder", @@ -2758,6 +3020,15 @@ dependencies = [ "base64 0.13.0", ] +[[package]] +name = "rustls-pemfile" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +dependencies = [ + "base64 0.13.0", +] + [[package]] name = "rustversion" version = "1.0.6" @@ -2791,6 +3062,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +dependencies = [ + "lazy_static", + "winapi", +] + [[package]] name = "scopeguard" version = "1.1.0" @@ -2817,6 +3098,29 @@ dependencies = [ "untrusted", ] +[[package]] +name = "security-framework" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "segment" version = "0.2.0" @@ -2854,7 +3158,7 @@ checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -2950,9 +3254,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a86232ab60fa71287d7f2ddae4a7073f6b7aac33631c3015abb556f08c6d0a3e" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" @@ -2967,10 +3271,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f7474f0b646d228360ab62ed974744617bc869d959eac8403bfa3665931a7fb" [[package]] -name = "smallstr" -version = "0.2.0" +name = "slice-group-by" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e922794d168678729ffc7e07182721a14219c65814e66e91b839a272fe5ae4f" +checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" + +[[package]] +name = "smallstr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b1aefdf380735ff8ded0b15f31aab05daf1f70216c01c02a12926badd1df9d" dependencies = [ "serde", "smallvec", @@ -3040,9 +3350,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "ebd69e719f31e88618baa1eaa6ee2de5c9a1c004f1e9ecdb58e8352a13f20a01" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", @@ -3066,7 +3376,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", "unicode-xid 0.2.2", ] @@ -3112,9 +3422,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -3127,9 +3437,9 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "textwrap" -version = "0.14.2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" @@ -3148,7 +3458,7 @@ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", ] [[package]] @@ -3174,12 +3484,11 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi", "winapi", ] @@ -3245,7 +3554,17 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio", ] [[package]] @@ -3315,20 +3634,21 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c650a8ef0cd2dd93736f033d21cbd1224c5a967aa0c258d00fcf7dafef9b9f" +checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" dependencies = [ "cfg-if 1.0.0", + "log", "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" +checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" dependencies = [ "lazy_static", ] @@ -3487,9 +3807,15 @@ dependencies = [ [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" @@ -3512,7 +3838,7 @@ dependencies = [ "log", "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", "wasm-bindgen-shared", ] @@ -3546,7 +3872,7 @@ checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "syn 1.0.86", + "syn 1.0.88", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3598,9 +3924,9 @@ dependencies = [ [[package]] name = "whatlang" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a346d2eb29c03618693ed24a29d1acd0c3f2cb08ae58b9669d7461e033cf703" +checksum = "349357fdf0f049dcb402da4a4c5a5aae80a7f6b3e5976b38475ce4ac18e5cd2f" dependencies = [ "hashbrown 0.7.2", ] @@ -3691,9 +4017,9 @@ checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi", ] @@ -3707,6 +4033,12 @@ dependencies = [ "libc", ] +[[package]] +name = "yada" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d12cb7a57bbf2ab670ed9545bae3648048547f9039279a89ce000208e585c1" + [[package]] name = "zerocopy" version = "0.3.0" @@ -3724,7 +4056,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb" dependencies = [ "proc-macro2 1.0.36", - "syn 1.0.86", + "syn 1.0.88", "synstructure", ] @@ -3739,7 +4071,7 @@ dependencies = [ "crc32fast", "flate2", "thiserror", - "time 0.1.44", + "time 0.1.43", ] [[package]] diff --git a/meilisearch-auth/Cargo.toml b/meilisearch-auth/Cargo.toml index 6fdbe0a46..ae24cf46c 100644 --- a/meilisearch-auth/Cargo.toml +++ b/meilisearch-auth/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" [dependencies] enum-iterator = "0.7.0" -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } sha2 = "0.9.6" meilisearch-error = { path = "../meilisearch-error" } serde_json = { version = "1.0.67", features = ["preserve_order"] } @@ -13,3 +12,4 @@ time = { version = "0.3.7", features = ["serde-well-known", "formatting", "parsi rand = "0.8.4" serde = { version = "1.0.130", features = ["derive"] } thiserror = "1.0.28" +milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.24.0" } diff --git a/meilisearch-auth/src/error.rs b/meilisearch-auth/src/error.rs index 70cfd3905..8a87eda27 100644 --- a/meilisearch-auth/src/error.rs +++ b/meilisearch-auth/src/error.rs @@ -25,7 +25,7 @@ pub enum AuthControllerError { } internal_error!( - AuthControllerError: heed::Error, + AuthControllerError: milli::heed::Error, std::io::Error, serde_json::Error, std::str::Utf8Error diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index dab75cc5f..4bd3cdded 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -8,8 +8,8 @@ use std::path::Path; use std::str; use std::sync::Arc; -use heed::types::{ByteSlice, DecodeIgnore, SerdeJson}; -use heed::{Database, Env, EnvOpenOptions, RwTxn}; +use milli::heed::types::{ByteSlice, DecodeIgnore, SerdeJson}; +use milli::heed::{Database, Env, EnvOpenOptions, RwTxn}; use time::OffsetDateTime; use super::error::Result; @@ -39,7 +39,7 @@ impl Drop for HeedAuthStore { } } -pub fn open_auth_store_env(path: &Path) -> heed::Result { +pub fn open_auth_store_env(path: &Path) -> milli::heed::Result { let mut options = EnvOpenOptions::new(); options.map_size(AUTH_STORE_SIZE); // 1GB options.max_dbs(2); @@ -203,7 +203,7 @@ impl HeedAuthStore { /// optionnally on a spcific index, for a given key. pub struct KeyIdActionCodec; -impl<'a> heed::BytesDecode<'a> for KeyIdActionCodec { +impl<'a> milli::heed::BytesDecode<'a> for KeyIdActionCodec { type DItem = (KeyId, Action, Option<&'a [u8]>); fn bytes_decode(bytes: &'a [u8]) -> Option { @@ -218,7 +218,7 @@ impl<'a> heed::BytesDecode<'a> for KeyIdActionCodec { } } -impl<'a> heed::BytesEncode<'a> for KeyIdActionCodec { +impl<'a> milli::heed::BytesEncode<'a> for KeyIdActionCodec { type EItem = (&'a KeyId, &'a Action, Option<&'a [u8]>); fn bytes_encode((key_id, action, index): &Self::EItem) -> Option> { diff --git a/meilisearch-http/Cargo.toml b/meilisearch-http/Cargo.toml index da7d9e61a..65f71bbff 100644 --- a/meilisearch-http/Cargo.toml +++ b/meilisearch-http/Cargo.toml @@ -39,7 +39,6 @@ flate2 = "1.0.21" fst = "0.4.7" futures = "0.3.17" futures-util = "0.3.17" -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } http = "0.2.4" indexmap = { version = "1.7.0", features = ["serde-1"] } iso8601-duration = "0.1.0" @@ -77,6 +76,7 @@ tokio = { version = "1.11.0", features = ["full"] } tokio-stream = "0.1.7" uuid = { version = "0.8.2", features = ["serde"] } walkdir = "2.3.2" +milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.24.0" } pin-project-lite = "0.2.8" [dev-dependencies] diff --git a/meilisearch-http/src/helpers/env.rs b/meilisearch-http/src/helpers/env.rs index 9bc81bc69..b36bdce0d 100644 --- a/meilisearch-http/src/helpers/env.rs +++ b/meilisearch-http/src/helpers/env.rs @@ -4,7 +4,7 @@ pub trait EnvSizer { fn size(&self) -> u64; } -impl EnvSizer for heed::Env { +impl EnvSizer for milli::heed::Env { fn size(&self) -> u64 { WalkDir::new(self.path()) .into_iter() diff --git a/meilisearch-lib/Cargo.toml b/meilisearch-lib/Cargo.toml index b64104219..03591fb7d 100644 --- a/meilisearch-lib/Cargo.toml +++ b/meilisearch-lib/Cargo.toml @@ -19,7 +19,6 @@ flate2 = "1.0.21" fst = "0.4.7" futures = "0.3.17" futures-util = "0.3.17" -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } http = "0.2.4" indexmap = { version = "1.7.0", features = ["serde-1"] } itertools = "0.10.1" @@ -27,7 +26,7 @@ lazy_static = "1.4.0" log = "0.4.14" meilisearch-error = { path = "../meilisearch-error" } meilisearch-auth = { path = "../meilisearch-auth" } -milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.22.2" } +milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.24.0" } mime = "0.3.16" num_cpus = "1.13.0" once_cell = "1.8.0" diff --git a/meilisearch-lib/src/index/dump.rs b/meilisearch-lib/src/index/dump.rs index 153b724b9..fea133c37 100644 --- a/meilisearch-lib/src/index/dump.rs +++ b/meilisearch-lib/src/index/dump.rs @@ -3,9 +3,9 @@ use std::io::{BufReader, Seek, SeekFrom, Write}; use std::path::Path; use anyhow::Context; -use heed::{EnvOpenOptions, RoTxn}; use indexmap::IndexMap; use milli::documents::DocumentBatchReader; +use milli::heed::{EnvOpenOptions, RoTxn}; use milli::update::{IndexDocumentsConfig, IndexerConfig}; use serde::{Deserialize, Serialize}; diff --git a/meilisearch-lib/src/index/error.rs b/meilisearch-lib/src/index/error.rs index f8dcc0dc8..89a12a41f 100644 --- a/meilisearch-lib/src/index/error.rs +++ b/meilisearch-lib/src/index/error.rs @@ -21,7 +21,7 @@ pub enum IndexError { internal_error!( IndexError: std::io::Error, - heed::Error, + milli::heed::Error, fst::Error, serde_json::Error, update_file_store::UpdateFileStoreError, diff --git a/meilisearch-lib/src/index/index.rs b/meilisearch-lib/src/index/index.rs index a17ed8504..cfc867c7d 100644 --- a/meilisearch-lib/src/index/index.rs +++ b/meilisearch-lib/src/index/index.rs @@ -5,7 +5,7 @@ use std::ops::Deref; use std::path::Path; use std::sync::Arc; -use heed::{EnvOpenOptions, RoTxn}; +use milli::heed::{EnvOpenOptions, RoTxn}; use milli::update::{IndexerConfig, Setting}; use milli::{obkv_to_json, FieldDistribution, FieldId}; use serde::{Deserialize, Serialize}; @@ -37,7 +37,7 @@ impl IndexMeta { Self::new_txn(index, &txn) } - pub fn new_txn(index: &Index, txn: &heed::RoTxn) -> Result { + pub fn new_txn(index: &Index, txn: &milli::heed::RoTxn) -> Result { let created_at = index.created_at(txn)?; let updated_at = index.updated_at(txn)?; let primary_key = index.primary_key(txn)?.map(String::from); @@ -250,7 +250,7 @@ impl Index { fn fields_to_display>( &self, - txn: &heed::RoTxn, + txn: &milli::heed::RoTxn, attributes_to_retrieve: &Option>, fields_ids_map: &milli::FieldsIdsMap, ) -> Result> { @@ -278,7 +278,7 @@ impl Index { let _txn = self.write_txn()?; self.inner .env - .copy_to_path(dst, heed::CompactionOption::Enabled)?; + .copy_to_path(dst, milli::heed::CompactionOption::Enabled)?; Ok(()) } } diff --git a/meilisearch-lib/src/index/updates.rs b/meilisearch-lib/src/index/updates.rs index 07bb0da0e..6c8ab6e40 100644 --- a/meilisearch-lib/src/index/updates.rs +++ b/meilisearch-lib/src/index/updates.rs @@ -176,7 +176,7 @@ pub struct Facets { impl Index { fn update_primary_key_txn<'a, 'b>( &'a self, - txn: &mut heed::RwTxn<'a, 'b>, + txn: &mut milli::heed::RwTxn<'a, 'b>, primary_key: String, ) -> Result { let mut builder = milli::update::Settings::new(txn, self, self.indexer_config.as_ref()); diff --git a/meilisearch-lib/src/index_controller/dump_actor/error.rs b/meilisearch-lib/src/index_controller/dump_actor/error.rs index 73faf1bbb..f72b6d1dd 100644 --- a/meilisearch-lib/src/index_controller/dump_actor/error.rs +++ b/meilisearch-lib/src/index_controller/dump_actor/error.rs @@ -18,7 +18,7 @@ pub enum DumpActorError { } internal_error!( - DumpActorError: heed::Error, + DumpActorError: milli::heed::Error, std::io::Error, tokio::task::JoinError, tokio::sync::oneshot::error::RecvError, diff --git a/meilisearch-lib/src/index_controller/dump_actor/loaders/v4.rs b/meilisearch-lib/src/index_controller/dump_actor/loaders/v4.rs index d342f010f..38d61f146 100644 --- a/meilisearch-lib/src/index_controller/dump_actor/loaders/v4.rs +++ b/meilisearch-lib/src/index_controller/dump_actor/loaders/v4.rs @@ -1,9 +1,9 @@ use std::path::Path; use std::sync::Arc; -use heed::EnvOpenOptions; use log::info; use meilisearch_auth::AuthController; +use milli::heed::EnvOpenOptions; use crate::analytics; use crate::index_controller::dump_actor::Metadata; diff --git a/meilisearch-lib/src/index_controller/mod.rs b/meilisearch-lib/src/index_controller/mod.rs index 108084c57..70a59be62 100644 --- a/meilisearch-lib/src/index_controller/mod.rs +++ b/meilisearch-lib/src/index_controller/mod.rs @@ -48,8 +48,8 @@ pub type Payload = Box< dyn Stream> + Send + Sync + 'static + Unpin, >; -pub fn open_meta_env(path: &Path, size: usize) -> heed::Result { - let mut options = heed::EnvOpenOptions::new(); +pub fn open_meta_env(path: &Path, size: usize) -> milli::heed::Result { + let mut options = milli::heed::EnvOpenOptions::new(); options.map_size(size); options.max_dbs(20); options.open(path) diff --git a/meilisearch-lib/src/index_resolver/error.rs b/meilisearch-lib/src/index_resolver/error.rs index 9ac607a58..6c86aa6b8 100644 --- a/meilisearch-lib/src/index_resolver/error.rs +++ b/meilisearch-lib/src/index_resolver/error.rs @@ -45,7 +45,7 @@ impl From for IndexResolverError { } internal_error!( - IndexResolverError: heed::Error, + IndexResolverError: milli::heed::Error, uuid::Error, std::io::Error, tokio::task::JoinError, diff --git a/meilisearch-lib/src/index_resolver/meta_store.rs b/meilisearch-lib/src/index_resolver/meta_store.rs index 6ca615dbf..f53f9cae9 100644 --- a/meilisearch-lib/src/index_resolver/meta_store.rs +++ b/meilisearch-lib/src/index_resolver/meta_store.rs @@ -4,8 +4,8 @@ use std::io::{BufRead, BufReader, Write}; use std::path::{Path, PathBuf}; use std::sync::Arc; -use heed::types::{SerdeBincode, Str}; -use heed::{CompactionOption, Database, Env}; +use milli::heed::types::{SerdeBincode, Str}; +use milli::heed::{CompactionOption, Database, Env}; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -56,7 +56,7 @@ impl Drop for HeedMetaStore { } impl HeedMetaStore { - pub fn new(env: Arc) -> Result { + pub fn new(env: Arc) -> Result { let db = env.create_database(Some("uuids"))?; Ok(Self { env, db }) } @@ -153,7 +153,7 @@ impl HeedMetaStore { Ok(()) } - pub fn load_dump(src: impl AsRef, env: Arc) -> Result<()> { + pub fn load_dump(src: impl AsRef, env: Arc) -> Result<()> { let src_indexes = src.as_ref().join(UUIDS_DB_PATH).join("data.jsonl"); let indexes = File::open(&src_indexes)?; let mut indexes = BufReader::new(indexes); diff --git a/meilisearch-lib/src/index_resolver/mod.rs b/meilisearch-lib/src/index_resolver/mod.rs index 9428d4a78..8ca3efdc6 100644 --- a/meilisearch-lib/src/index_resolver/mod.rs +++ b/meilisearch-lib/src/index_resolver/mod.rs @@ -7,10 +7,10 @@ use std::path::Path; use std::sync::Arc; use error::{IndexResolverError, Result}; -use heed::Env; use index_store::{IndexStore, MapIndexStore}; use meilisearch_error::ResponseError; use meta_store::{HeedMetaStore, IndexMetaStore}; +use milli::heed::Env; use milli::update::{DocumentDeletionResult, IndexerConfig}; use serde::{Deserialize, Serialize}; use time::OffsetDateTime; @@ -39,7 +39,7 @@ pub fn create_index_resolver( path: impl AsRef, index_size: usize, indexer_opts: &IndexerOpts, - meta_env: Arc, + meta_env: Arc, file_store: UpdateFileStore, ) -> anyhow::Result { let uuid_store = HeedMetaStore::new(meta_env)?; diff --git a/meilisearch-lib/src/lib.rs b/meilisearch-lib/src/lib.rs index 21b8eb8c3..c49acfeee 100644 --- a/meilisearch-lib/src/lib.rs +++ b/meilisearch-lib/src/lib.rs @@ -25,7 +25,7 @@ pub trait EnvSizer { fn size(&self) -> u64; } -impl EnvSizer for heed::Env { +impl EnvSizer for milli::heed::Env { fn size(&self) -> u64 { WalkDir::new(self.path()) .into_iter() diff --git a/meilisearch-lib/src/snapshot.rs b/meilisearch-lib/src/snapshot.rs index 3667d1021..6c27ad2f0 100644 --- a/meilisearch-lib/src/snapshot.rs +++ b/meilisearch-lib/src/snapshot.rs @@ -149,7 +149,7 @@ impl SnapshotJob { let env = open_meta_env(&self.src_path, self.meta_env_size)?; let dst = path.join("data.mdb"); - env.copy_to_path(dst, heed::CompactionOption::Enabled)?; + env.copy_to_path(dst, milli::heed::CompactionOption::Enabled)?; Ok(()) } @@ -180,12 +180,12 @@ impl SnapshotJob { let dst = dst.join("data.mdb"); - let mut options = heed::EnvOpenOptions::new(); + let mut options = milli::heed::EnvOpenOptions::new(); options.map_size(self.index_size); let index = milli::Index::new(options, entry.path())?; index .env - .copy_to_path(dst, heed::CompactionOption::Enabled)?; + .copy_to_path(dst, milli::heed::CompactionOption::Enabled)?; } Ok(()) @@ -198,7 +198,7 @@ impl SnapshotJob { let dst = dst.join("data.mdb"); let env = open_auth_store_env(&auth_path)?; - env.copy_to_path(dst, heed::CompactionOption::Enabled)?; + env.copy_to_path(dst, milli::heed::CompactionOption::Enabled)?; Ok(()) } diff --git a/meilisearch-lib/src/tasks/error.rs b/meilisearch-lib/src/tasks/error.rs index 38561314f..d849b4c10 100644 --- a/meilisearch-lib/src/tasks/error.rs +++ b/meilisearch-lib/src/tasks/error.rs @@ -16,7 +16,7 @@ pub enum TaskError { } internal_error!( - TaskError: heed::Error, + TaskError: milli::heed::Error, JoinError, std::io::Error, serde_json::Error, diff --git a/meilisearch-lib/src/tasks/task_store/mod.rs b/meilisearch-lib/src/tasks/task_store/mod.rs index 695981d25..bdcd13f37 100644 --- a/meilisearch-lib/src/tasks/task_store/mod.rs +++ b/meilisearch-lib/src/tasks/task_store/mod.rs @@ -5,8 +5,8 @@ use std::io::{BufWriter, Write}; use std::path::Path; use std::sync::Arc; -use heed::{Env, RwTxn}; use log::debug; +use milli::heed::{Env, RwTxn}; use time::OffsetDateTime; use super::error::TaskError; @@ -61,7 +61,7 @@ impl Clone for TaskStore { } impl TaskStore { - pub fn new(env: Arc) -> Result { + pub fn new(env: Arc) -> Result { let store = Arc::new(Store::new(env)?); Ok(Self { store }) } @@ -248,7 +248,7 @@ pub mod test { } impl MockTaskStore { - pub fn new(env: Arc) -> Result { + pub fn new(env: Arc) -> Result { Ok(Self::Real(TaskStore::new(env)?)) } diff --git a/meilisearch-lib/src/tasks/task_store/store.rs b/meilisearch-lib/src/tasks/task_store/store.rs index 582cfe27c..4ff986d8b 100644 --- a/meilisearch-lib/src/tasks/task_store/store.rs +++ b/meilisearch-lib/src/tasks/task_store/store.rs @@ -1,5 +1,5 @@ #[allow(clippy::upper_case_acronyms)] -type BEU64 = heed::zerocopy::U64; +type BEU64 = milli::heed::zerocopy::U64; const UID_TASK_IDS: &str = "uid_task_id"; const TASKS: &str = "tasks"; @@ -12,8 +12,8 @@ use std::ops::Range; use std::result::Result as StdResult; use std::sync::Arc; -use heed::types::{ByteSlice, OwnedType, SerdeJson, Unit}; -use heed::{BytesDecode, BytesEncode, Database, Env, RoTxn, RwTxn}; +use milli::heed::types::{ByteSlice, OwnedType, SerdeJson, Unit}; +use milli::heed::{BytesDecode, BytesEncode, Database, Env, RoTxn, RwTxn}; use crate::tasks::task::{Task, TaskId}; @@ -73,7 +73,7 @@ impl Store { /// be in an invalid state, with dangling processing tasks. /// You want to patch all un-finished tasks and put them in your pending /// queue with the `reset_and_return_unfinished_update` method. - pub fn new(env: Arc) -> Result { + pub fn new(env: Arc) -> Result { let uids_task_ids = env.create_database(Some(UID_TASK_IDS))?; let tasks = env.create_database(Some(TASKS))?; @@ -130,7 +130,7 @@ impl Store { let range = from..limit .map(|limit| (limit as u64).saturating_add(from)) .unwrap_or(u64::MAX); - let iter: Box>> = match filter { + let iter: Box>> = match filter { Some( ref filter @ TaskFilter { indexes: Some(_), .. @@ -150,7 +150,7 @@ impl Store { ), }; - let apply_fitler = |task: &StdResult<_, heed::Error>| match task { + let apply_fitler = |task: &StdResult<_, milli::heed::Error>| match task { Ok(ref t) => filter .as_ref() .and_then(|filter| filter.filter_fn.as_ref()) @@ -162,7 +162,7 @@ impl Store { let tasks = iter .filter(apply_fitler) .take(limit.unwrap_or(usize::MAX)) - .try_fold::<_, _, StdResult<_, heed::Error>>(Vec::new(), |mut v, task| { + .try_fold::<_, _, StdResult<_, milli::heed::Error>>(Vec::new(), |mut v, task| { v.push(task?); Ok(v) })?; @@ -172,7 +172,7 @@ impl Store { fn compute_candidates( &self, - txn: &heed::RoTxn, + txn: &milli::heed::RoTxn, filter: &TaskFilter, range: Range, ) -> Result> { @@ -188,10 +188,10 @@ impl Store { self.uids_task_ids .remap_key_type::() .rev_prefix_iter(txn, &index_uid)? - .map(|entry| -> StdResult<_, heed::Error> { + .map(|entry| -> StdResult<_, milli::heed::Error> { let (key, _) = entry?; - let (_, id) = - IndexUidTaskIdCodec::bytes_decode(key).ok_or(heed::Error::Decoding)?; + let (_, id) = IndexUidTaskIdCodec::bytes_decode(key) + .ok_or(milli::heed::Error::Decoding)?; Ok(id) }) .skip_while(|entry| { @@ -212,7 +212,7 @@ impl Store { // if we encounter an error we returns true to collect it later .unwrap_or(true) }) - .try_for_each::<_, StdResult<(), heed::Error>>(|id| { + .try_for_each::<_, StdResult<(), milli::heed::Error>>(|id| { candidates.push(id?); Ok(()) })?; @@ -225,8 +225,8 @@ impl Store { #[cfg(test)] pub mod test { - use heed::EnvOpenOptions; use itertools::Itertools; + use milli::heed::EnvOpenOptions; use nelson::Mocker; use proptest::collection::vec; use proptest::prelude::*; @@ -244,10 +244,10 @@ pub mod test { Fake(Mocker), } - pub struct TmpEnv(TempDir, Arc); + pub struct TmpEnv(TempDir, Arc); impl TmpEnv { - pub fn env(&self) -> Arc { + pub fn env(&self) -> Arc { self.1.clone() } } @@ -264,7 +264,7 @@ pub mod test { } impl MockStore { - pub fn new(env: Arc) -> Result { + pub fn new(env: Arc) -> Result { Ok(Self::Real(Store::new(env)?)) }