From e704728ee72f6a5a3ebf6e8bfeee08cf58d44153 Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 6 Mar 2023 13:30:06 +0100 Subject: [PATCH 01/29] fix the snapshots permissions on unix system --- index-scheduler/src/batch.rs | 11 ++++++++--- meilisearch/tests/snapshot/mod.rs | 22 +++++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 66c516d9b..5bb75bcba 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -675,9 +675,6 @@ impl IndexScheduler { } // 3. Snapshot every indexes - // TODO we are opening all of the indexes it can be too much we should unload all - // of the indexes we are trying to open. It would be even better to only unload - // the ones that were opened by us. Or maybe use a LRU in the index mapper. for result in self.index_mapper.index_mapping.iter(&rtxn)? { let (name, uuid) = result?; let index = self.index_mapper.index(&rtxn, name)?; @@ -714,6 +711,14 @@ impl IndexScheduler { // 5.3 Change the permission to make the snapshot readonly let mut permissions = file.metadata()?.permissions(); permissions.set_readonly(true); + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + #[allow(clippy::non_octal_unix_permissions)] + // rwxrwxrwx + permissions.set_mode(0b100100100); + } + file.set_permissions(permissions)?; for task in &mut tasks { diff --git a/meilisearch/tests/snapshot/mod.rs b/meilisearch/tests/snapshot/mod.rs index 4615f3ea9..fa2b1a272 100644 --- a/meilisearch/tests/snapshot/mod.rs +++ b/meilisearch/tests/snapshot/mod.rs @@ -1,8 +1,8 @@ use std::time::Duration; +use actix_rt::time::sleep; use meilisearch::option::ScheduleSnapshot; use meilisearch::Opt; -use tokio::time::sleep; use crate::common::server::default_settings; use crate::common::{GetAllDocumentsOptions, Server}; @@ -23,14 +23,13 @@ macro_rules! verify_snapshot { }; let (snapshot, _) = test(snapshot.clone()).await; let (orig, _) = test(orig.clone()).await; - assert_eq!(snapshot, orig); + assert_eq!(snapshot, orig, "Got \n{}\nWhile expecting:\n{}", serde_json::to_string_pretty(&snapshot).unwrap(), serde_json::to_string_pretty(&orig).unwrap()); } )* }; } #[actix_rt::test] -#[ignore] // TODO: unignore async fn perform_snapshot() { let temp = tempfile::tempdir().unwrap(); let snapshot_dir = tempfile::tempdir().unwrap(); @@ -56,11 +55,21 @@ async fn perform_snapshot() { index.wait_task(2).await; - sleep(Duration::from_secs(2)).await; + sleep(Duration::from_secs(1)).await; let temp = tempfile::tempdir().unwrap(); let snapshot_path = snapshot_dir.path().to_owned().join("db.snapshot"); + #[cfg_attr(windows, allow(unused))] + let snapshot_meta = std::fs::metadata(&snapshot_path).unwrap(); + + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + let mode = snapshot_meta.permissions().mode(); + // rwxrwxrwx + meili_snap::snapshot!(format!("{:b}", mode), @"1000000100100100"); + } let options = Opt { import_snapshot: Some(snapshot_path), ..default_settings(temp.path()) }; @@ -71,7 +80,10 @@ async fn perform_snapshot() { // for some reason the db sizes differ. this may be due to the compaction options we have // set when performing the snapshot //server.stats(), - server.tasks(), + + // We can't test all the tasks contained in the snapshot because the on the original instance the snapshotCreation task was added + server.tasks_filter("?from=4"), + server.index("test").get_all_documents(GetAllDocumentsOptions::default()), server.index("test").settings(), server.index("test1").get_all_documents(GetAllDocumentsOptions::default()), From fd5c48941a8c8a9ad0d31270a54be2f90440efb2 Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 23 Feb 2023 19:31:57 +0100 Subject: [PATCH 02/29] Add cache on the indexes stats --- index-scheduler/src/batch.rs | 38 +++++++++++++++++++-- index-scheduler/src/index_mapper/mod.rs | 42 +++++++++++++++++++++-- index-scheduler/src/lib.rs | 19 +++++++++-- meilisearch/src/routes/indexes/mod.rs | 45 +++++++++++-------------- meilisearch/src/routes/mod.rs | 38 +++++++-------------- 5 files changed, 122 insertions(+), 60 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 66c516d9b..03287d7ae 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -828,20 +828,36 @@ impl IndexScheduler { Ok(vec![task]) } Batch::IndexOperation { op, must_create_index } => { - let index_uid = op.index_uid(); + let index_uid = op.index_uid().to_string(); let index = if must_create_index { // create the index if it doesn't already exist let wtxn = self.env.write_txn()?; - self.index_mapper.create_index(wtxn, index_uid, None)? + self.index_mapper.create_index(wtxn, &index_uid, None)? } else { let rtxn = self.env.read_txn()?; - self.index_mapper.index(&rtxn, index_uid)? + self.index_mapper.index(&rtxn, &index_uid)? }; let mut index_wtxn = index.write_txn()?; let tasks = self.apply_index_operation(&mut index_wtxn, &index, op)?; index_wtxn.commit()?; + // if the update processed successfully, we're going to store the new + // stats of the index. Since the tasks have already been processed and + // this is a non-critical operation. If it fails, we should not fail + // the entire batch. + let res = || -> Result<()> { + let mut wtxn = self.env.write_txn()?; + self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + wtxn.commit()?; + Ok(()) + }(); + + match res { + Ok(_) => (), + Err(e) => error!("Could not write the stats of the index {}", e), + } + Ok(tasks) } Batch::IndexCreation { index_uid, primary_key, task } => { @@ -875,6 +891,22 @@ impl IndexScheduler { task.status = Status::Succeeded; task.details = Some(Details::IndexInfo { primary_key }); + // if the update processed successfully, we're going to store the new + // stats of the index. Since the tasks have already been processed and + // this is a non-critical operation. If it fails, we should not fail + // the entire batch. + let res = || -> Result<()> { + let mut wtxn = self.env.write_txn()?; + self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + wtxn.commit()?; + Ok(()) + }(); + + match res { + Ok(_) => (), + Err(e) => error!("Could not write the stats of the index {}", e), + } + Ok(vec![task]) } Batch::IndexDeletion { index_uid, index_has_been_created, mut tasks } => { diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 1693d12d7..9e1de438a 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -4,10 +4,11 @@ use std::time::Duration; use std::{fs, thread}; use log::error; -use meilisearch_types::heed::types::Str; +use meilisearch_types::heed::types::{SerdeJson, Str}; use meilisearch_types::heed::{Database, Env, RoTxn, RwTxn}; use meilisearch_types::milli::update::IndexerConfig; -use meilisearch_types::milli::Index; +use meilisearch_types::milli::{FieldDistribution, Index}; +use serde::{Deserialize, Serialize}; use time::OffsetDateTime; use uuid::Uuid; @@ -19,6 +20,7 @@ use crate::{Error, Result}; mod index_map; const INDEX_MAPPING: &str = "index-mapping"; +const INDEX_STATS: &str = "index-stats"; /// Structure managing meilisearch's indexes. /// @@ -52,6 +54,8 @@ pub struct IndexMapper { /// Map an index name with an index uuid currently available on disk. pub(crate) index_mapping: Database, + /// Map an index name with the cached stats associated to the index. + pub(crate) index_stats: Database>, /// Path to the folder where the LMDB environments of each index are. base_path: PathBuf, @@ -76,6 +80,15 @@ pub enum IndexStatus { Available(Index), } +#[derive(Serialize, Deserialize, Debug)] +pub struct IndexStats { + pub number_of_documents: u64, + pub database_size: u64, + pub field_distribution: FieldDistribution, + pub created_at: OffsetDateTime, + pub updated_at: OffsetDateTime, +} + impl IndexMapper { pub fn new( env: &Env, @@ -88,6 +101,7 @@ impl IndexMapper { Ok(Self { index_map: Arc::new(RwLock::new(IndexMap::new(index_count))), index_mapping: env.create_database(Some(INDEX_MAPPING))?, + index_stats: env.create_database(Some(INDEX_STATS))?, base_path, index_base_map_size, index_growth_amount, @@ -135,6 +149,7 @@ impl IndexMapper { /// Removes the index from the mapping table and the in-memory index map /// but keeps the associated tasks. pub fn delete_index(&self, mut wtxn: RwTxn, name: &str) -> Result<()> { + self.index_stats.delete(&mut wtxn, name)?; let uuid = self .index_mapping .get(&wtxn, name)? @@ -360,6 +375,29 @@ impl IndexMapper { Ok(()) } + /// Return the stored stats of an index. + pub fn stats_of(&self, rtxn: &RoTxn, index_uid: &str) -> Result { + self.index_stats + .get(rtxn, index_uid)? + .ok_or_else(|| Error::IndexNotFound(index_uid.to_string())) + } + + /// Return the stats of an index and write it in the index-mapper database. + pub fn compute_and_store_stats_of(&self, wtxn: &mut RwTxn, index_uid: &str) -> Result<()> { + let index = self.index(wtxn, index_uid)?; + let database_size = index.on_disk_size()?; + let rtxn = index.read_txn()?; + let stats = IndexStats { + number_of_documents: index.number_of_documents(&rtxn)?, + database_size, + field_distribution: index.field_distribution(&rtxn)?, + created_at: index.created_at(&rtxn)?, + updated_at: index.updated_at(&rtxn)?, + }; + self.index_stats.put(wtxn, index_uid, &stats)?; + Ok(()) + } + pub fn index_exists(&self, rtxn: &RoTxn, name: &str) -> Result { Ok(self.index_mapping.get(rtxn, name)?.is_some()) } diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index e23e4ff8b..4f875eaca 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -44,10 +44,9 @@ use file_store::FileStore; use meilisearch_types::error::ResponseError; use meilisearch_types::heed::types::{OwnedType, SerdeBincode, SerdeJson, Str}; use meilisearch_types::heed::{self, Database, Env, RoTxn}; -use meilisearch_types::milli; use meilisearch_types::milli::documents::DocumentsBatchBuilder; use meilisearch_types::milli::update::IndexerConfig; -use meilisearch_types::milli::{CboRoaringBitmapCodec, Index, RoaringBitmapCodec, BEU32}; +use meilisearch_types::milli::{self, CboRoaringBitmapCodec, Index, RoaringBitmapCodec, BEU32}; use meilisearch_types::tasks::{Kind, KindWithContent, Status, Task}; use roaring::RoaringBitmap; use synchronoise::SignalEvent; @@ -566,7 +565,7 @@ impl IndexScheduler { } /// Return the name of all indexes without opening them. - pub fn index_names(self) -> Result> { + pub fn index_names(&self) -> Result> { let rtxn = self.env.read_txn()?; self.index_mapper.index_names(&rtxn) } @@ -1186,6 +1185,14 @@ impl IndexScheduler { Ok(TickOutcome::TickAgain(processed_tasks)) } + pub fn index_stats(&self, index_uid: &str) -> Result { + let is_indexing = self.is_index_processing(index_uid)?; + let rtxn = self.read_txn()?; + let index_stats = self.index_mapper.stats_of(&rtxn, index_uid)?; + + Ok(IndexStats { is_indexing, inner_stats: index_stats }) + } + pub(crate) fn delete_persisted_task_data(&self, task: &Task) -> Result<()> { match task.content_uuid() { Some(content_file) => self.delete_update_file(content_file), @@ -1238,6 +1245,12 @@ struct IndexBudget { task_db_size: usize, } +#[derive(Debug)] +pub struct IndexStats { + pub is_indexing: bool, + pub inner_stats: index_mapper::IndexStats, +} + #[cfg(test)] mod tests { use std::io::{BufWriter, Seek, Write}; diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index c5c168786..28988e30b 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -220,6 +220,24 @@ pub async fn delete_index( Ok(HttpResponse::Accepted().json(task)) } +#[derive(Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct IndexStats { + pub number_of_documents: u64, + pub is_indexing: bool, + pub field_distribution: FieldDistribution, +} + +impl From for IndexStats { + fn from(stats: index_scheduler::IndexStats) -> Self { + IndexStats { + number_of_documents: stats.inner_stats.number_of_documents, + is_indexing: stats.is_indexing, + field_distribution: stats.inner_stats.field_distribution, + } + } +} + pub async fn get_index_stats( index_scheduler: GuardedData, Data>, index_uid: web::Path, @@ -229,33 +247,8 @@ pub async fn get_index_stats( let index_uid = IndexUid::try_from(index_uid.into_inner())?; analytics.publish("Stats Seen".to_string(), json!({ "per_index_uid": true }), Some(&req)); - let stats = IndexStats::new((*index_scheduler).clone(), index_uid.into_inner())?; + let stats = IndexStats::from(index_scheduler.index_stats(&index_uid)?); debug!("returns: {:?}", stats); Ok(HttpResponse::Ok().json(stats)) } - -#[derive(Serialize, Debug)] -#[serde(rename_all = "camelCase")] -pub struct IndexStats { - pub number_of_documents: u64, - pub is_indexing: bool, - pub field_distribution: FieldDistribution, -} - -impl IndexStats { - pub fn new( - index_scheduler: Data, - index_uid: String, - ) -> Result { - // we check if there is currently a task processing associated with this index. - let is_processing = index_scheduler.is_index_processing(&index_uid)?; - let index = index_scheduler.index(&index_uid)?; - let rtxn = index.read_txn()?; - Ok(IndexStats { - number_of_documents: index.number_of_documents(&rtxn)?, - is_indexing: is_processing, - field_distribution: index.field_distribution(&rtxn)?, - }) - } -} diff --git a/meilisearch/src/routes/mod.rs b/meilisearch/src/routes/mod.rs index a4523e53f..f54c8ee38 100644 --- a/meilisearch/src/routes/mod.rs +++ b/meilisearch/src/routes/mod.rs @@ -2,7 +2,7 @@ use std::collections::BTreeMap; use actix_web::web::Data; use actix_web::{web, HttpRequest, HttpResponse}; -use index_scheduler::{IndexScheduler, Query}; +use index_scheduler::IndexScheduler; use log::debug; use meilisearch_auth::AuthController; use meilisearch_types::error::ResponseError; @@ -12,7 +12,6 @@ use serde::{Deserialize, Serialize}; use serde_json::json; use time::OffsetDateTime; -use self::indexes::IndexStats; use crate::analytics::Analytics; use crate::extractors::authentication::policies::*; use crate::extractors::authentication::GuardedData; @@ -234,7 +233,7 @@ pub struct Stats { pub database_size: u64, #[serde(serialize_with = "time::serde::rfc3339::option::serialize")] pub last_update: Option, - pub indexes: BTreeMap, + pub indexes: BTreeMap, } async fn get_stats( @@ -260,32 +259,19 @@ pub fn create_all_stats( let mut last_task: Option = None; let mut indexes = BTreeMap::new(); let mut database_size = 0; - let processing_task = index_scheduler.get_tasks_from_authorized_indexes( - Query { statuses: Some(vec![Status::Processing]), limit: Some(1), ..Query::default() }, - filters, - )?; + // accumulate the size of each indexes - let processing_index = processing_task.first().and_then(|task| task.index_uid()); - index_scheduler.try_for_each_index(|name, index| { - if !filters.is_index_authorized(name) { - return Ok(()); + for index_uid in index_scheduler.index_names()? { + if !filters.is_index_authorized(&index_uid) { + continue; } - database_size += index.on_disk_size()?; - - let rtxn = index.read_txn()?; - let stats = IndexStats { - number_of_documents: index.number_of_documents(&rtxn)?, - is_indexing: processing_index.map_or(false, |index_name| name == index_name), - field_distribution: index.field_distribution(&rtxn)?, - }; - - let updated_at = index.updated_at(&rtxn)?; - last_task = last_task.map_or(Some(updated_at), |last| Some(last.max(updated_at))); - - indexes.insert(name.to_string(), stats); - Ok(()) - })?; + let stats = index_scheduler.index_stats(&index_uid)?; + last_task = last_task.map_or(Some(stats.inner_stats.updated_at), |last| { + Some(last.max(stats.inner_stats.updated_at)) + }); + indexes.insert(index_uid.to_string(), stats.into()); + } database_size += index_scheduler.size()?; database_size += auth_controller.size()?; From 3bbf7605427e3b644b367a72ea9e592ff661b29d Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 23 Feb 2023 19:53:58 +0100 Subject: [PATCH 03/29] update most snapshots --- index-scheduler/src/insta_snapshot.rs | 12 +++++++++++- .../cancel_enqueued_task/cancel_processed.snap | 3 +-- .../cancel_enqueued_task/initial_tasks_enqueued.snap | 2 +- .../cancel_mix_of_tasks/first_task_processed.snap | 3 ++- .../processing_second_task_cancel_enqueued.snap | 3 ++- .../cancel_task_registered.snap | 2 +- .../initial_task_processing.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../cancel_succeeded_task/cancel_processed.snap | 3 ++- .../initial_task_processed.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../all_tasks_processed.snap | 5 ++++- .../lib.rs/document_addition/after_register.snap | 2 +- .../document_addition/after_the_batch_creation.snap | 2 +- .../once_everything_is_processed.snap | 3 ++- .../after_processing_the_batch.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../before_index_creation.snap | 3 ++- .../both_task_succeeded.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../1.snap | 2 +- .../2.snap | 2 +- .../after_failing_the_deletion.snap | 2 +- .../after_last_successful_addition.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../document_addition_batch_created.snap | 2 +- .../document_addition_failed.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../after_register.snap | 2 +- .../index_creation_failed.snap | 2 +- .../after_batch_succeeded.snap | 3 ++- .../after_failing_to_commit.snap | 3 ++- ...on_succeeded_but_index_scheduler_not_updated.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../task_successfully_processed.snap | 3 ++- .../after_batch_creation.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../index_creation_failed.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../processed_the_first_task.snap | 3 ++- .../processed_the_second_task.snap | 4 +++- .../processed_the_third_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../process_tasks_without_autobatching/first.snap | 3 ++- .../process_tasks_without_autobatching/fourth.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_fourth_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../process_tasks_without_autobatching/second.snap | 3 ++- .../process_tasks_without_autobatching/third.snap | 3 ++- .../lib.rs/query_tasks_canceled_by/start.snap | 3 ++- .../processed_all_tasks.snap | 5 ++++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../src/snapshots/lib.rs/query_tasks_simple/end.snap | 4 +++- .../snapshots/lib.rs/query_tasks_simple/start.snap | 2 +- .../lib.rs/query_tasks_special_rules/start.snap | 2 +- .../everything_is_succesfully_registered.snap | 2 +- .../src/snapshots/lib.rs/swap_indexes/create_a.snap | 3 ++- .../src/snapshots/lib.rs/swap_indexes/create_b.snap | 4 +++- .../src/snapshots/lib.rs/swap_indexes/create_c.snap | 5 ++++- .../src/snapshots/lib.rs/swap_indexes/create_d.snap | 6 +++++- .../lib.rs/swap_indexes/first_swap_processed.snap | 6 +++++- .../lib.rs/swap_indexes/first_swap_registered.snap | 6 +++++- .../lib.rs/swap_indexes/second_swap_processed.snap | 6 +++++- .../swap_indexes/third_empty_swap_processed.snap | 6 +++++- .../lib.rs/swap_indexes/two_swaps_registered.snap | 6 +++++- .../after_the_index_creation.snap | 6 +++++- .../swap_indexes_errors/first_swap_failed.snap | 6 +++++- .../swap_indexes_errors/initial_tasks_processed.snap | 6 +++++- .../initial_tasks_enqueued.snap | 2 +- .../initial_tasks_processed.snap | 3 ++- .../task_deletion_processed.snap | 3 ++- .../after_registering_the_task_deletion.snap | 3 ++- .../initial_tasks_enqueued.snap | 2 +- .../initial_tasks_processed.snap | 3 ++- .../task_deletion_processed.snap | 3 ++- .../initial_tasks_enqueued.snap | 2 +- .../task_deletion_done.snap | 2 +- .../task_deletion_enqueued.snap | 2 +- .../task_deletion_processing.snap | 2 +- .../after_processing_the_10_tasks.snap | 3 ++- .../after_registering_the_10_tasks.snap | 3 ++- .../processed_the_first_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../after_registering_the_10_tasks.snap | 3 ++- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- .../processed_the_first_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../after_processing_the_10_tasks.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 2 +- .../five_tasks_processed.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../only_first_task_failed.snap | 2 +- .../after_registering_the_10_tasks.snap | 3 ++- .../all_tasks_processed.snap | 3 ++- .../processed_the_first_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../after_registering_the_5_tasks.snap | 2 +- .../fifth_task_succeeds.snap | 3 ++- .../first_and_second_task_fails.snap | 3 ++- .../fourth_task_fails.snap | 3 ++- .../third_task_succeeds.snap | 3 ++- .../after_registering_the_3_tasks.snap | 2 +- .../only_first_task_succeed.snap | 3 ++- .../second_task_fails.snap | 3 ++- .../third_task_fails.snap | 3 ++- .../after_registering_the_3_tasks.snap | 2 +- .../only_first_task_succeed.snap | 3 ++- .../second_and_third_tasks_fails.snap | 3 ++- .../after_registering_the_6_tasks.snap | 2 +- .../all_other_tasks_succeeds.snap | 3 ++- .../first_task_fails.snap | 3 ++- .../second_task_fails.snap | 3 ++- .../third_task_succeeds.snap | 3 ++- .../after_registering_the_6_tasks.snap | 2 +- .../all_other_tasks_succeeds.snap | 3 ++- .../first_task_succeed.snap | 3 ++- .../second_task_fails.snap | 3 ++- .../third_task_succeeds.snap | 3 ++- .../snapshots/lib.rs/test_document_replace/1.snap | 2 +- .../snapshots/lib.rs/test_document_replace/2.snap | 3 ++- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- .../src/snapshots/lib.rs/test_document_update/1.snap | 2 +- .../src/snapshots/lib.rs/test_document_update/2.snap | 3 ++- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- 147 files changed, 268 insertions(+), 148 deletions(-) diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index dcc348c98..43509aa84 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -254,6 +254,16 @@ pub fn snapshot_canceled_by( snap } pub fn snapshot_index_mapper(rtxn: &RoTxn, mapper: &IndexMapper) -> String { + let mut s = String::new(); let names = mapper.index_names(rtxn).unwrap(); - format!("{names:?}") + + for name in names { + let stats = mapper.stats_of(rtxn, &name).unwrap(); + s.push_str(&format!( + "{name}: {{ number_of_documents: {}, field_distribution: {:?} }}\n", + stats.number_of_documents, stats.field_distribution + )); + } + + s } diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap index a06b82c74..077784965 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap @@ -1,6 +1,5 @@ --- source: index-scheduler/src/lib.rs -assertion_line: 1755 --- ### Autobatching Enabled = true ### Processing Tasks: @@ -23,7 +22,7 @@ canceled [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: 1 [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap index 743e74a14..3d3830b29 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap @@ -20,7 +20,7 @@ enqueued [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap index 36d34ff93..16be0e4d5 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap @@ -23,7 +23,8 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap index 30da295f9..46ccfcb8b 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap @@ -25,7 +25,8 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap index 061f334c8..f65b5ee67 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap @@ -20,7 +20,7 @@ enqueued [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap index 905cec451..8a3ad4661 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap index d454b501e..6873f8b56 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap index b3842cc12..36e47f569 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap @@ -21,7 +21,8 @@ succeeded [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: 1 [] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap index e52a80fae..028e03446 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap @@ -19,7 +19,8 @@ succeeded [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap index d454b501e..6873f8b56 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap index f9195857a..c9a12c327 100644 --- a/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap @@ -27,7 +27,10 @@ doggos [0,3,] girafos [2,5,] ---------------------------------------------------------------------- ### Index Mapper: -["cattos", "doggos", "girafos"] +cattos: { number_of_documents: 0, field_distribution: {} } +doggos: { number_of_documents: 0, field_distribution: {} } +girafos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap index 10291b206..33d58eab6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap index 6079a4317..b4a6da3af 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap index f70496b81..b27288a0f 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap @@ -21,7 +21,8 @@ succeeded [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap index 35dc0b41a..d26e62bff 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap index bd65a6d99..e0f371120 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap index 379e90120..97ba419a8 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap @@ -23,7 +23,8 @@ succeeded [0,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap index 2ff82bfd2..fd96ee974 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap @@ -23,7 +23,7 @@ succeeded [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap index 86674ccd0..68ded1f0d 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap index f4d3a8190..1601a6b25 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap @@ -22,7 +22,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap index e0813f109..c200ce402 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap index f8586b7b8..7884dfe08 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap @@ -21,7 +21,7 @@ succeeded [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap index 2850af744..1d4aa24e2 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap @@ -21,7 +21,7 @@ failed [0,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap index 59e18bdb0..0f9dfd3e6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap @@ -22,7 +22,8 @@ failed [0,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 3, field_distribution: {"catto": 1, "doggo": 2, "id": 3} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap index 9356e6dba..5753db7e6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap index 89e341184..0b6191f9e 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap index 10291b206..33d58eab6 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap index c1bfd7db9..18edc3613 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap @@ -19,7 +19,7 @@ failed [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap index 63a2d606e..f252cc8ef 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap index 252ae082e..d2b06a4f4 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap @@ -19,7 +19,7 @@ failed [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap index bdda4e086..9c31fd318 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap @@ -18,7 +18,8 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap index bdda4e086..9c31fd318 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap @@ -18,7 +18,8 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap index 6079a4317..b4a6da3af 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap index c75a3b87e..3f34ca57b 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap @@ -18,7 +18,7 @@ enqueued [0,] index_a [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap index 656b06ad3..f17bfe38f 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] index_a [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap index 0cf82317b..75d5d8760 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap @@ -20,7 +20,7 @@ index_a [0,] index_b [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap index 8b73d12c2..a69818dfa 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap @@ -22,7 +22,7 @@ index_a [0,2,] index_b [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap index 60d8c4cdb..9100e5075 100644 --- a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap @@ -19,7 +19,7 @@ failed [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap index 63a2d606e..f252cc8ef 100644 --- a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap index 3a4705635..a34531f2a 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap @@ -23,7 +23,8 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap index 979ec8af6..f163ee3d7 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap @@ -23,7 +23,9 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -["cattos", "doggos"] +cattos: { number_of_documents: 0, field_distribution: {} } +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap index c7190dd8b..7e8db762f 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap @@ -23,7 +23,8 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -["cattos"] +cattos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap index 82cc517cb..4020c2db0 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap @@ -20,7 +20,7 @@ cattos [1,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap index 76a6b3f08..f25280bc1 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap @@ -22,7 +22,7 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap index fa09eba28..d67c659c6 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap @@ -23,7 +23,8 @@ succeeded [0,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap index e52c36718..3d5c28e2c 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap @@ -23,7 +23,8 @@ succeeded [0,1,2,3,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap index 52866bed6..c2ad519fa 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap index 6ac8aa79f..a9eb16d21 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap @@ -22,7 +22,7 @@ enqueued [0,1,2,3,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap index 32d32daaf..ad269dd7a 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap index 75ceef14d..6267a840f 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap @@ -21,7 +21,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap index 4b1577aa6..d45867c49 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap @@ -23,7 +23,8 @@ succeeded [0,1,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap index 2ac3b141f..9705c5321 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap @@ -23,7 +23,8 @@ succeeded [0,1,2,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap index 624606ba9..b05f05d5d 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap @@ -26,7 +26,8 @@ catto [0,2,] doggo [1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: 3 [1,2,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap index 694bbff26..a07c46427 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap @@ -23,7 +23,10 @@ doggo [0,] whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto", "doggo", "whalo"] +catto: { number_of_documents: 0, field_distribution: {} } +doggo: { number_of_documents: 0, field_distribution: {} } +whalo: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap index c1a0899cd..8eb784c9b 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggo [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap index 6daa6bce2..776d699e1 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap @@ -20,7 +20,7 @@ doggo [0,] whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap index 8427679e7..1a3fc5b53 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap @@ -22,7 +22,7 @@ doggo [0,] whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap index 65838db64..fe3b1eed4 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap @@ -24,7 +24,9 @@ doggo [1,] whalo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto", "doggo"] +catto: { number_of_documents: 0, field_distribution: {} } +doggo: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap index aed5aed8c..1fa3fa1ab 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap @@ -22,7 +22,7 @@ doggo [1,] whalo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap index 2bb4f7590..4baa9d87a 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap @@ -24,7 +24,7 @@ doggo [1,2,] whalo [3,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap b/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap index 360752bc6..62796a929 100644 --- a/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap @@ -23,7 +23,7 @@ catto [0,1,2,] doggo [3,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap index 2c009ef1a..47a6dc6a7 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap @@ -25,7 +25,8 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a"] +a: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap index 6d6e89c5f..13b783feb 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap @@ -25,7 +25,9 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap index c12334ecf..6b4bdb756 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap @@ -25,7 +25,10 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap index b20b3b320..038903c59 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap @@ -25,7 +25,11 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap index 17e8936f0..c7ab30a36 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap @@ -28,7 +28,11 @@ c [3,4,5,] d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap index f2c74f676..c0727d6e9 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap @@ -27,7 +27,11 @@ c [2,4,] d [3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap index acfbc4c77..07acbe474 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap @@ -28,7 +28,11 @@ c [1,4,5,] d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap index c7c6faae6..aeeba29f8 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap @@ -29,7 +29,11 @@ c [1,4,5,] d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap index 0f8355f25..d1847fed1 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap @@ -28,7 +28,11 @@ c [2,4,5,] d [3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap index b20b3b320..038903c59 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap @@ -25,7 +25,11 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap index fd9790835..4632820f0 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap @@ -30,7 +30,11 @@ e [4,] f [4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap index b20b3b320..038903c59 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap @@ -25,7 +25,11 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap index fc37dcf2d..4b4a50bfb 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap @@ -20,7 +20,7 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap index e4c4d9d7e..6e3a6e8ed 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap @@ -21,7 +21,8 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap index 8874cc9e0..c47a7a95f 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap @@ -22,7 +22,8 @@ succeeded [2,3,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap index 3c3bd754e..302fd5f5e 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap @@ -23,7 +23,8 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap index fc37dcf2d..4b4a50bfb 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap @@ -20,7 +20,7 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap index e4c4d9d7e..6e3a6e8ed 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap @@ -21,7 +21,8 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap index 29c251027..cf64406b8 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap @@ -21,7 +21,8 @@ succeeded [2,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap index afb8af39c..25e2deadc 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap @@ -22,7 +22,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap index 6fc0a4f7c..743cd615f 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap @@ -25,7 +25,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap index e2ad01246..5c4d9be04 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap @@ -24,7 +24,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap index 8017f77b9..49df62cb7 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap @@ -24,7 +24,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap index d112c8145..cb6ec63de 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,10,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap index 7daafcccb..2e4845fb4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap index ed265ac6e..e046ed386 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap index 83f17bcef..e2e2133f5 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap index fc2fdc5f1..970587ba2 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,10,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap index 48f972785..5de505cf2 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap index 6214f3139..606367737 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap index 52866bed6..c2ad519fa 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap index ed28c121b..5a6ea9100 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap @@ -28,7 +28,7 @@ failed [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap index 828d4dafc..e2217e1f4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap index 671713c8e..02d0b1988 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap index d995cab9e..8164394c8 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap @@ -28,7 +28,7 @@ failed [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap index 3ae875bff..4e0bb97ab 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap @@ -28,7 +28,7 @@ failed [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap index ad5968b58..f98802f21 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap index 19ee47359..ea6ef400a 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap @@ -29,7 +29,8 @@ failed [0,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 9, field_distribution: {"doggo": 9, "id": 9} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap index ed57bc4e3..c27a1b5cb 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap @@ -28,7 +28,7 @@ failed [0,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap index 61b7f3016..68599f03e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap index 0962dcdf5..b442a9c2f 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,10,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap index ed265ac6e..e046ed386 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap index 53d3d28da..fde8e3451 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap @@ -22,7 +22,7 @@ enqueued [0,1,2,3,4,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap index 58e16fa55..85d7ba460 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap @@ -24,7 +24,8 @@ failed [0,1,3,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 2, field_distribution: {"doggo": 2, "id": 2} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap index 98bd2b580..ab788cc36 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap @@ -23,7 +23,8 @@ failed [0,1,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap index 279040fdb..2a8748657 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap @@ -24,7 +24,8 @@ failed [0,1,3,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap index 441bb59e2..58cdbe432 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap @@ -24,7 +24,8 @@ failed [0,1,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap index cff9b0bd9..5699c58c4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap @@ -20,7 +20,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap index d3888af01..85689fa4d 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap @@ -21,7 +21,8 @@ succeeded [0,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap index 84baeca92..18db64ca4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap @@ -22,7 +22,8 @@ failed [1,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap index 6b92f91d1..4a9edc602 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap @@ -22,7 +22,8 @@ failed [1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap index 4c4f88a30..1187159b7 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap @@ -20,7 +20,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap index 76b814eab..22b91bb60 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap @@ -21,7 +21,8 @@ succeeded [0,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap index 26b0f6584..05eca0af1 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap @@ -22,7 +22,8 @@ failed [1,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap index 078ba06d3..47b0994ec 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap @@ -23,7 +23,7 @@ enqueued [0,1,2,3,4,5,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap index 69cbd3def..a7464685a 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap @@ -25,7 +25,8 @@ failed [0,1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 4, field_distribution: {"doggo": 4, "paw": 4} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap index ac63f3b58..5c7f7e8d8 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap @@ -24,7 +24,8 @@ failed [0,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap index 538b4af93..2c255aeba 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap @@ -24,7 +24,8 @@ failed [0,1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap index 1271b6f92..2f944adcf 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap @@ -25,7 +25,8 @@ failed [0,1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "paw": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap index 0e9ecb81a..c89abf033 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap @@ -23,7 +23,7 @@ enqueued [0,1,2,3,4,5,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap index 437c6375e..1f55e8f6d 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap @@ -25,7 +25,8 @@ failed [1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "doggoid": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap index fd480420a..532cef143 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap @@ -24,7 +24,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "doggoid": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap index 99001edb0..2920c3b2e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap @@ -25,7 +25,8 @@ failed [1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "doggoid": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap index 64625ca90..8981dd8c3 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap @@ -25,7 +25,8 @@ failed [1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 2, field_distribution: {"doggo": 2, "doggoid": 2} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap index a47ef319f..21581fe78 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap index f6423719c..fabf764bc 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap index 0f52c9664..1beba7264 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap index b80b8bb40..a0b121320 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap index b1528c103..88bf59f8e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap index 6157fb454..53f0fbc9b 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap index 736f998d0..d8383818e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap index 85fda1a43..6785786e3 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap index a1fc55210..4c8fd7ea6 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap index fb0b629ec..f184bb3cb 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap index 330a3318e..9095f031b 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap index 20fda049f..6c6fba517 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap index 9fd990aa9..8aa7cfbea 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: From 076a3d371c733a0e90905038bde4626f3b9a21c6 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 28 Feb 2023 15:24:31 +0100 Subject: [PATCH 04/29] Eagerly compute stats as fallback to the cache. - Refactor all around to avoid spawning indexes more times than necessary --- index-scheduler/src/batch.rs | 12 +++- index-scheduler/src/index_mapper/mod.rs | 83 +++++++++++++++++++------ index-scheduler/src/lib.rs | 5 ++ meilisearch/src/routes/indexes/mod.rs | 4 ++ 4 files changed, 83 insertions(+), 21 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 03287d7ae..41b5793b1 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -847,8 +847,10 @@ impl IndexScheduler { // this is a non-critical operation. If it fails, we should not fail // the entire batch. let res = || -> Result<()> { + let index_rtxn = index.read_txn()?; + let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; let mut wtxn = self.env.write_txn()?; - self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; wtxn.commit()?; Ok(()) }(); @@ -888,6 +890,10 @@ impl IndexScheduler { )?; index_wtxn.commit()?; } + + // drop rtxn before starting a new wtxn on the same db + rtxn.commit()?; + task.status = Status::Succeeded; task.details = Some(Details::IndexInfo { primary_key }); @@ -897,7 +903,9 @@ impl IndexScheduler { // the entire batch. let res = || -> Result<()> { let mut wtxn = self.env.write_txn()?; - self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + let index_rtxn = index.read_txn()?; + let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; wtxn.commit()?; Ok(()) }(); diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 9e1de438a..174f4f9a3 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -54,8 +54,11 @@ pub struct IndexMapper { /// Map an index name with an index uuid currently available on disk. pub(crate) index_mapping: Database, - /// Map an index name with the cached stats associated to the index. - pub(crate) index_stats: Database>, + /// Map an index UUID with the cached stats associated to the index. + /// + /// Using an UUID forces to use the index_mapping table to recover the index behind a name, ensuring + /// consistency wrt index swapping. + pub(crate) index_stats: Database>, /// Path to the folder where the LMDB environments of each index are. base_path: PathBuf, @@ -80,15 +83,39 @@ pub enum IndexStatus { Available(Index), } +/// The statistics that can be computed from an `Index` object. #[derive(Serialize, Deserialize, Debug)] pub struct IndexStats { + /// Number of documents in the index. pub number_of_documents: u64, + /// Size of the index' DB, in bytes. pub database_size: u64, + /// Association of every field name with the number of times it occurs in the documents. pub field_distribution: FieldDistribution, + /// Creation date of the index. pub created_at: OffsetDateTime, + /// Date of the last update of the index. pub updated_at: OffsetDateTime, } +impl IndexStats { + /// Compute the stats of an index + /// + /// # Parameters + /// + /// - rtxn: a RO transaction for the index, obtained from `Index::read_txn()`. + pub fn new(index: &Index, rtxn: &RoTxn) -> Result { + let database_size = index.on_disk_size()?; + Ok(IndexStats { + number_of_documents: index.number_of_documents(rtxn)?, + database_size, + field_distribution: index.field_distribution(rtxn)?, + created_at: index.created_at(rtxn)?, + updated_at: index.updated_at(rtxn)?, + }) + } +} + impl IndexMapper { pub fn new( env: &Env, @@ -149,12 +176,14 @@ impl IndexMapper { /// Removes the index from the mapping table and the in-memory index map /// but keeps the associated tasks. pub fn delete_index(&self, mut wtxn: RwTxn, name: &str) -> Result<()> { - self.index_stats.delete(&mut wtxn, name)?; let uuid = self .index_mapping .get(&wtxn, name)? .ok_or_else(|| Error::IndexNotFound(name.to_string()))?; + // Not an error if the index had no stats in cache. + self.index_stats.delete(&mut wtxn, &uuid)?; + // Once we retrieved the UUID of the index we remove it from the mapping table. assert!(self.index_mapping.delete(&mut wtxn, name)?); @@ -375,26 +404,42 @@ impl IndexMapper { Ok(()) } - /// Return the stored stats of an index. + /// The stats of an index. + /// + /// If available in the cache, they are directly returned. + /// Otherwise, the `Index` is opened to compute the stats on the fly (the result is not cached). + /// The stats for an index are cached after each `Index` update. pub fn stats_of(&self, rtxn: &RoTxn, index_uid: &str) -> Result { - self.index_stats + let uuid = self + .index_mapping .get(rtxn, index_uid)? - .ok_or_else(|| Error::IndexNotFound(index_uid.to_string())) + .ok_or_else(|| Error::IndexNotFound(index_uid.to_string()))?; + + match self.index_stats.get(rtxn, &uuid)? { + Some(stats) => Ok(stats), + None => { + let index = self.index(rtxn, index_uid)?; + let index_rtxn = index.read_txn()?; + IndexStats::new(&index, &index_rtxn) + } + } } - /// Return the stats of an index and write it in the index-mapper database. - pub fn compute_and_store_stats_of(&self, wtxn: &mut RwTxn, index_uid: &str) -> Result<()> { - let index = self.index(wtxn, index_uid)?; - let database_size = index.on_disk_size()?; - let rtxn = index.read_txn()?; - let stats = IndexStats { - number_of_documents: index.number_of_documents(&rtxn)?, - database_size, - field_distribution: index.field_distribution(&rtxn)?, - created_at: index.created_at(&rtxn)?, - updated_at: index.updated_at(&rtxn)?, - }; - self.index_stats.put(wtxn, index_uid, &stats)?; + /// Stores the new stats for an index. + /// + /// Expected usage is to compute the stats the index using `IndexStats::new`, the pass it to this function. + pub fn store_stats_of( + &self, + wtxn: &mut RwTxn, + index_uid: &str, + stats: IndexStats, + ) -> Result<()> { + let uuid = self + .index_mapping + .get(wtxn, index_uid)? + .ok_or_else(|| Error::IndexNotFound(index_uid.to_string()))?; + + self.index_stats.put(wtxn, &uuid, &stats)?; Ok(()) } diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 4f875eaca..7c5970fad 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -1245,9 +1245,14 @@ struct IndexBudget { task_db_size: usize, } +/// The statistics that can be computed from an `Index` object and the scheduler. +/// +/// Compared with `index_mapper::IndexStats`, it adds the scheduling status. #[derive(Debug)] pub struct IndexStats { + /// Whether this index is currently performing indexation, according to the scheduler. pub is_indexing: bool, + /// Internal stats computed from the index. pub inner_stats: index_mapper::IndexStats, } diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index 28988e30b..ba925b3d5 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -220,11 +220,15 @@ pub async fn delete_index( Ok(HttpResponse::Accepted().json(task)) } +/// Stats of an `Index`, as known to the `stats` route. #[derive(Serialize, Debug)] #[serde(rename_all = "camelCase")] pub struct IndexStats { + /// Number of documents in the index pub number_of_documents: u64, + /// Whether the index is currently performing indexation, according to the scheduler. pub is_indexing: bool, + /// Association of every field name with the number of times it occurs in the documents. pub field_distribution: FieldDistribution, } From 76288fad72321531617b023425d71ec6461b000c Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 28 Feb 2023 15:36:25 +0100 Subject: [PATCH 05/29] Fix snapshots --- .../lib.rs/cancel_mix_of_tasks/aborted_indexation.snap | 4 +++- .../lib.rs/cancel_mix_of_tasks/cancel_processed.snap | 5 +++-- .../lib.rs/cancel_processing_task/aborted_indexation.snap | 3 ++- .../lib.rs/cancel_processing_task/cancel_processed.snap | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap index 5c6078b51..112cd597b 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap @@ -25,7 +25,9 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["beavero", "catto"] +beavero: { number_of_documents: 0, field_distribution: {} } +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap index f67fff59f..1e5182f80 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap @@ -1,6 +1,5 @@ --- source: index-scheduler/src/lib.rs -assertion_line: 1859 --- ### Autobatching Enabled = true ### Processing Tasks: @@ -27,7 +26,9 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["beavero", "catto"] +beavero: { number_of_documents: 0, field_distribution: {} } +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: 3 [1,2,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap index 6074673e3..a2187ab2b 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap @@ -20,7 +20,8 @@ enqueued [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap index f2035c7fe..0ede1ffd3 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap @@ -1,6 +1,5 @@ --- source: index-scheduler/src/lib.rs -assertion_line: 1818 --- ### Autobatching Enabled = true ### Processing Tasks: @@ -23,7 +22,8 @@ canceled [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: 1 [0,] From e5d0bef6d8a5a4d7e5bad09195d18c9e36c2e72a Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 6 Mar 2023 17:04:24 +0100 Subject: [PATCH 06/29] update a comment --- meilisearch/tests/snapshot/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch/tests/snapshot/mod.rs b/meilisearch/tests/snapshot/mod.rs index fa2b1a272..5df325287 100644 --- a/meilisearch/tests/snapshot/mod.rs +++ b/meilisearch/tests/snapshot/mod.rs @@ -81,7 +81,7 @@ async fn perform_snapshot() { // set when performing the snapshot //server.stats(), - // We can't test all the tasks contained in the snapshot because the on the original instance the snapshotCreation task was added + // The original instance contains the snapshotCreation task, while the snapshotted-instance does not. For this reason we need to compare the task queue **after** the task 4 server.tasks_filter("?from=4"), server.index("test").get_all_documents(GetAllDocumentsOptions::default()), From d34faa8f9c410699699630b45df9069c7fe761cf Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 6 Mar 2023 18:09:09 +0100 Subject: [PATCH 07/29] put back the sleep as it was and fix the from --- meilisearch/tests/snapshot/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch/tests/snapshot/mod.rs b/meilisearch/tests/snapshot/mod.rs index 5df325287..97db3db8d 100644 --- a/meilisearch/tests/snapshot/mod.rs +++ b/meilisearch/tests/snapshot/mod.rs @@ -36,7 +36,7 @@ async fn perform_snapshot() { let options = Opt { snapshot_dir: snapshot_dir.path().to_owned(), - schedule_snapshot: ScheduleSnapshot::Enabled(1), + schedule_snapshot: ScheduleSnapshot::Enabled(2), ..default_settings(temp.path()) }; @@ -55,7 +55,7 @@ async fn perform_snapshot() { index.wait_task(2).await; - sleep(Duration::from_secs(1)).await; + sleep(Duration::from_secs(2)).await; let temp = tempfile::tempdir().unwrap(); @@ -82,7 +82,7 @@ async fn perform_snapshot() { //server.stats(), // The original instance contains the snapshotCreation task, while the snapshotted-instance does not. For this reason we need to compare the task queue **after** the task 4 - server.tasks_filter("?from=4"), + server.tasks_filter("?from=2"), server.index("test").get_all_documents(GetAllDocumentsOptions::default()), server.index("test").settings(), From 7faa9a22f6d398496fe6fc07028763a55c9466e1 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 7 Mar 2023 14:00:54 +0100 Subject: [PATCH 08/29] Pass IndexStat by ref in store_stats_of --- index-scheduler/src/batch.rs | 4 ++-- index-scheduler/src/index_mapper/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 41b5793b1..8d0e1ac3f 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -850,7 +850,7 @@ impl IndexScheduler { let index_rtxn = index.read_txn()?; let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; let mut wtxn = self.env.write_txn()?; - self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, &stats)?; wtxn.commit()?; Ok(()) }(); @@ -905,7 +905,7 @@ impl IndexScheduler { let mut wtxn = self.env.write_txn()?; let index_rtxn = index.read_txn()?; let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; - self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, &stats)?; wtxn.commit()?; Ok(()) }(); diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 174f4f9a3..2bf6f46ad 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -432,14 +432,14 @@ impl IndexMapper { &self, wtxn: &mut RwTxn, index_uid: &str, - stats: IndexStats, + stats: &IndexStats, ) -> Result<()> { let uuid = self .index_mapping .get(wtxn, index_uid)? .ok_or_else(|| Error::IndexNotFound(index_uid.to_string()))?; - self.index_stats.put(wtxn, &uuid, &stats)?; + self.index_stats.put(wtxn, &uuid, stats)?; Ok(()) } From 2f5b9fbbd83cf919f18749d632d046b1e7c75c2a Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 7 Mar 2023 14:05:27 +0100 Subject: [PATCH 09/29] Restore contribution of the index sizes to the db size - the index size now contributes to the db size even if the index is not authorized --- meilisearch/src/routes/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meilisearch/src/routes/mod.rs b/meilisearch/src/routes/mod.rs index f54c8ee38..c824d3f36 100644 --- a/meilisearch/src/routes/mod.rs +++ b/meilisearch/src/routes/mod.rs @@ -260,13 +260,17 @@ pub fn create_all_stats( let mut indexes = BTreeMap::new(); let mut database_size = 0; - // accumulate the size of each indexes for index_uid in index_scheduler.index_names()? { + // Accumulate the size of all indexes, even unauthorized ones, so + // as to return a database_size representative of the correct database size on disk. + // See for context. + let stats = index_scheduler.index_stats(&index_uid)?; + database_size += stats.inner_stats.database_size; + if !filters.is_index_authorized(&index_uid) { continue; } - let stats = index_scheduler.index_stats(&index_uid)?; last_task = last_task.map_or(Some(stats.inner_stats.updated_at), |last| { Some(last.max(stats.inner_stats.updated_at)) }); From da48506f151adf79d398d89bf8ac24e249cc0338 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Tue, 7 Mar 2023 18:35:26 +0100 Subject: [PATCH 10/29] Rerun extraction when language detection might have failed --- .../extract/extract_docid_word_positions.rs | 177 ++++++++++++++---- 1 file changed, 143 insertions(+), 34 deletions(-) diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 2d51fcc1a..5a103f1e0 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -3,12 +3,14 @@ use std::convert::TryInto; use std::fs::File; use std::{io, mem, str}; -use charabia::{Language, Script, SeparatorKind, Token, TokenKind, TokenizerBuilder}; +use charabia::{Language, Script, SeparatorKind, Token, TokenKind, Tokenizer, TokenizerBuilder}; +use obkv::KvReader; use roaring::RoaringBitmap; use serde_json::Value; use super::helpers::{concat_u32s_array, create_sorter, sorter_into_reader, GrenadParameters}; use crate::error::{InternalError, SerializationError}; +use crate::update::index_documents::MergeFn; use crate::{ absolute_from_relative_position, FieldId, Result, MAX_POSITION_PER_ATTRIBUTE, MAX_WORD_LENGTH, }; @@ -33,7 +35,7 @@ pub fn extract_docid_word_positions( let max_memory = indexer.max_memory_by_thread(); let mut documents_ids = RoaringBitmap::new(); - let mut script_language_pair = HashMap::new(); + let mut script_language_docids = HashMap::new(); let mut docid_word_positions_sorter = create_sorter( grenad::SortAlgorithm::Stable, concat_u32s_array, @@ -45,11 +47,11 @@ pub fn extract_docid_word_positions( let mut key_buffer = Vec::new(); let mut field_buffer = String::new(); - let mut builder = TokenizerBuilder::new(); + let mut tokenizer_builder = TokenizerBuilder::new(); if let Some(stop_words) = stop_words { - builder.stop_words(stop_words); + tokenizer_builder.stop_words(stop_words); } - let tokenizer = builder.build(); + let tokenizer = tokenizer_builder.build(); let mut cursor = obkv_documents.into_cursor()?; while let Some((key, value)) = cursor.move_on_next()? { @@ -57,49 +59,120 @@ pub fn extract_docid_word_positions( .try_into() .map(u32::from_be_bytes) .map_err(|_| SerializationError::InvalidNumberSerialization)?; - let obkv = obkv::KvReader::::new(value); + let obkv = KvReader::::new(value); documents_ids.push(document_id); key_buffer.clear(); key_buffer.extend_from_slice(&document_id.to_be_bytes()); - for (field_id, field_bytes) in obkv.iter() { - if searchable_fields.as_ref().map_or(true, |sf| sf.contains(&field_id)) { - let value = - serde_json::from_slice(field_bytes).map_err(InternalError::SerdeJson)?; - field_buffer.clear(); - if let Some(field) = json_to_string(&value, &mut field_buffer) { - let tokens = process_tokens(tokenizer.tokenize(field)) - .take_while(|(p, _)| (*p as u32) < max_positions_per_attributes); + let mut script_language_word_count = HashMap::new(); - for (index, token) in tokens { - if let Some(language) = token.language { - let script = token.script; - let entry = script_language_pair - .entry((script, language)) - .or_insert_with(RoaringBitmap::new); - entry.push(document_id); - } - let token = token.lemma().trim(); - if !token.is_empty() && token.len() <= MAX_WORD_LENGTH { - key_buffer.truncate(mem::size_of::()); - key_buffer.extend_from_slice(token.as_bytes()); + extract_tokens_from_document( + &obkv, + searchable_fields, + &tokenizer, + max_positions_per_attributes, + &mut key_buffer, + &mut field_buffer, + &mut script_language_word_count, + &mut docid_word_positions_sorter, + )?; - let position: u16 = index - .try_into() - .map_err(|_| SerializationError::InvalidNumberSerialization)?; - let position = absolute_from_relative_position(field_id, position); - docid_word_positions_sorter - .insert(&key_buffer, position.to_ne_bytes())?; + // if we detect a potetial mistake in the language detection, + // we rerun the extraction forcing the tokenizer to detect the most frequently detected Languages. + // context: https://github.com/meilisearch/meilisearch/issues/3565 + if script_language_word_count.values().any(potential_language_detection_error) { + // build an allow list with the most frequent detected languages in the document. + let script_language: HashMap<_, _> = + script_language_word_count.iter().filter_map(most_frequent_languages).collect(); + + // if the allow list is empty, meaning that no Language is considered frequent, + // then we don't rerun the extraction. + if !script_language.is_empty() { + // build a new temporar tokenizer including the allow list. + let mut tokenizer_builder = TokenizerBuilder::new(); + if let Some(stop_words) = stop_words { + tokenizer_builder.stop_words(stop_words); + } + tokenizer_builder.allow_list(&script_language); + let tokenizer = tokenizer_builder.build(); + + script_language_word_count.clear(); + + // rerun the extraction. + extract_tokens_from_document( + &obkv, + searchable_fields, + &tokenizer, + max_positions_per_attributes, + &mut key_buffer, + &mut field_buffer, + &mut script_language_word_count, + &mut docid_word_positions_sorter, + )?; + } + } + + for (script, languages_frequency) in script_language_word_count { + for (language, _) in languages_frequency { + let entry = script_language_docids + .entry((script, language)) + .or_insert_with(RoaringBitmap::new); + entry.push(document_id); + } + } + } + + sorter_into_reader(docid_word_positions_sorter, indexer) + .map(|reader| (documents_ids, reader, script_language_docids)) +} + +fn extract_tokens_from_document>( + obkv: &KvReader, + searchable_fields: &Option>, + tokenizer: &Tokenizer, + max_positions_per_attributes: u32, + key_buffer: &mut Vec, + field_buffer: &mut String, + script_language_word_count: &mut HashMap>, + docid_word_positions_sorter: &mut grenad::Sorter, +) -> Result<()> { + for (field_id, field_bytes) in obkv.iter() { + if searchable_fields.as_ref().map_or(true, |sf| sf.contains(&field_id)) { + let value = serde_json::from_slice(field_bytes).map_err(InternalError::SerdeJson)?; + field_buffer.clear(); + if let Some(field) = json_to_string(&value, field_buffer) { + let tokens = process_tokens(tokenizer.tokenize(field)) + .take_while(|(p, _)| (*p as u32) < max_positions_per_attributes); + + for (index, token) in tokens { + // if a language has been detected for the token, we update the counter. + if let Some(language) = token.language { + let script = token.script; + let entry = + script_language_word_count.entry(script).or_insert_with(Vec::new); + match entry.iter_mut().find(|(l, _)| *l == language) { + Some((_, n)) => *n += 1, + None => entry.push((language, 1)), } } + let token = token.lemma().trim(); + if !token.is_empty() && token.len() <= MAX_WORD_LENGTH { + key_buffer.truncate(mem::size_of::()); + key_buffer.extend_from_slice(token.as_bytes()); + + let position: u16 = index + .try_into() + .map_err(|_| SerializationError::InvalidNumberSerialization)?; + let position = absolute_from_relative_position(field_id, position); + docid_word_positions_sorter.insert(&key_buffer, position.to_ne_bytes())?; + } } } } } - sorter_into_reader(docid_word_positions_sorter, indexer) - .map(|reader| (documents_ids, reader, script_language_pair)) + Ok(()) } /// Transform a JSON value into a string that can be indexed. @@ -183,3 +256,39 @@ fn process_tokens<'a>( }) .filter(|(_, t)| t.is_word()) } + +fn potential_language_detection_error(languages_frequency: &Vec<(Language, usize)>) -> bool { + if languages_frequency.len() > 1 { + let threshold = compute_laguage_frequency_threshold(languages_frequency); + languages_frequency.iter().any(|(_, c)| *c <= threshold) + } else { + false + } +} + +fn most_frequent_languages( + (script, languages_frequency): (&Script, &Vec<(Language, usize)>), +) -> Option<(Script, Vec)> { + if languages_frequency.len() > 1 { + let threshold = compute_laguage_frequency_threshold(languages_frequency); + + let languages: Vec<_> = languages_frequency + .iter() + .filter(|(_, c)| *c > threshold) + .map(|(l, _)| l.clone()) + .collect(); + + if languages.is_empty() { + None + } else { + Some((script.clone(), languages)) + } + } else { + None + } +} + +fn compute_laguage_frequency_threshold(languages_frequency: &Vec<(Language, usize)>) -> usize { + let total: usize = languages_frequency.iter().map(|(_, c)| c).sum(); + total / 20 // 5% is a completely arbitrar value. +} From 37d4551e8e196ad849a91eeef9b86c73bb5c88f8 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Tue, 7 Mar 2023 19:38:01 +0100 Subject: [PATCH 11/29] Add a threshold filtering the Languages allowed to be detected at search time --- milli/src/index.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/milli/src/index.rs b/milli/src/index.rs index a4048dfb0..7a473c0b4 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -1211,11 +1211,22 @@ impl Index { let soft_deleted_documents = self.soft_deleted_documents_ids(rtxn)?; let mut script_language: HashMap> = HashMap::new(); + let mut script_language_doc_count: Vec<(Script, Language, u64)> = Vec::new(); + let mut total = 0; for sl in self.script_language_docids.iter(rtxn)? { let ((script, language), docids) = sl?; // keep only Languages that contains at least 1 document. - if !soft_deleted_documents.is_superset(&docids) { + let remaining_documents_count = (docids - &soft_deleted_documents).len(); + total += remaining_documents_count; + if remaining_documents_count > 0 { + script_language_doc_count.push((script, language, remaining_documents_count)); + } + } + + let threshold = total / 20; // 5% (arbitrar) + for (script, language, count) in script_language_doc_count { + if count > threshold { if let Some(languages) = script_language.get_mut(&script) { (*languages).push(language); } else { From 3092cf0448f2e7edeece7becc44d51c1adfe0a14 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 8 Mar 2023 10:53:42 +0100 Subject: [PATCH 12/29] Fix clippy errors --- meilisearch/src/routes/indexes/mod.rs | 2 ++ .../extract/extract_docid_word_positions.rs | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index c5c168786..487511da0 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -100,6 +100,8 @@ pub async fn list_indexes( Ok(Some(IndexView::new(uid.to_string(), index)?)) })?; // Won't cause to open all indexes because IndexView doesn't keep the `Index` opened. + // error when trying to fix it: the trait `ExactSizeIterator` is not implemented for `Flatten>>` + #[allow(clippy::needless_collect)] let indexes: Vec = indexes.into_iter().flatten().collect(); let ret = paginate.as_pagination().auto_paginate_sized(indexes.into_iter()); diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 5a103f1e0..057559462 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -127,6 +127,7 @@ pub fn extract_docid_word_positions( .map(|reader| (documents_ids, reader, script_language_docids)) } +#[allow(clippy::too_many_arguments)] fn extract_tokens_from_document>( obkv: &KvReader, searchable_fields: &Option>, @@ -272,23 +273,20 @@ fn most_frequent_languages( if languages_frequency.len() > 1 { let threshold = compute_laguage_frequency_threshold(languages_frequency); - let languages: Vec<_> = languages_frequency - .iter() - .filter(|(_, c)| *c > threshold) - .map(|(l, _)| l.clone()) - .collect(); + let languages: Vec<_> = + languages_frequency.iter().filter(|(_, c)| *c > threshold).map(|(l, _)| *l).collect(); if languages.is_empty() { None } else { - Some((script.clone(), languages)) + Some((*script, languages)) } } else { None } } -fn compute_laguage_frequency_threshold(languages_frequency: &Vec<(Language, usize)>) -> usize { +fn compute_laguage_frequency_threshold(languages_frequency: &[(Language, usize)]) -> usize { let total: usize = languages_frequency.iter().map(|(_, c)| c).sum(); total / 20 // 5% is a completely arbitrar value. } From 24c0775c675f668bd9d9cc24ec419262c9cca70f Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 8 Mar 2023 12:36:04 +0100 Subject: [PATCH 13/29] Change indexing threshold --- .../index_documents/extract/extract_docid_word_positions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 057559462..6eee90c06 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -288,5 +288,5 @@ fn most_frequent_languages( fn compute_laguage_frequency_threshold(languages_frequency: &[(Language, usize)]) -> usize { let total: usize = languages_frequency.iter().map(|(_, c)| c).sum(); - total / 20 // 5% is a completely arbitrar value. + total / 10 // 10% is a completely arbitrar value. } From 7e2fd82e41c3cb0c9d241adb24f3d6c4fd888cc5 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 8 Mar 2023 12:44:16 +0100 Subject: [PATCH 14/29] Use Language allow list in the highlighter --- meilisearch/src/search.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs index c287f1ba0..ebf9ace1f 100644 --- a/meilisearch/src/search.rs +++ b/meilisearch/src/search.rs @@ -378,6 +378,11 @@ pub fn perform_search( let mut tokenizer_buidler = TokenizerBuilder::default(); tokenizer_buidler.create_char_map(true); + let script_lang_map = index.script_language(&rtxn)?; + if !script_lang_map.is_empty() { + tokenizer_buidler.allow_list(&script_lang_map); + } + let mut formatter_builder = MatcherBuilder::new(matching_words, tokenizer_buidler.build()); formatter_builder.crop_marker(query.crop_marker); formatter_builder.highlight_prefix(query.highlight_pre_tag); From b99ef3d33644b24cccf9ff167f698b30b99625d1 Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 7 Mar 2023 17:25:39 +0100 Subject: [PATCH 15/29] Update CI to still use ubuntu-18 --- .github/workflows/publish-binaries.yml | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml index 13555cbac..76dde74d1 100644 --- a/.github/workflows/publish-binaries.yml +++ b/.github/workflows/publish-binaries.yml @@ -96,14 +96,12 @@ jobs: publish-macos-apple-silicon: name: Publish binary for macOS silicon - runs-on: ${{ matrix.os }} + runs-on: macos-12 needs: check-version strategy: - fail-fast: false matrix: include: - - os: macos-12 - target: aarch64-apple-darwin + - target: aarch64-apple-darwin asset_name: meilisearch-macos-apple-silicon steps: - name: Checkout repository @@ -132,21 +130,29 @@ jobs: publish-aarch64: name: Publish binary for aarch64 - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest needs: check-version + container: + # Use ubuntu-18.04 to compile with glibc 2.27 + image: ubuntu:18.04 strategy: - fail-fast: false matrix: include: - - build: aarch64 - os: ubuntu-18.04 - target: aarch64-unknown-linux-gnu - linker: gcc-aarch64-linux-gnu - use-cross: true + - target: aarch64-unknown-linux-gnu asset_name: meilisearch-linux-aarch64 steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Install needed dependencies + run: | + apt-get update -y && apt upgrade -y + apt-get install -y curl build-essential gcc-aarch64-linux-gnu + - name: Set up Docker for cross compilation + run: | + apt-get install -y curl apt-transport-https ca-certificates software-properties-common + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - + add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + apt-get update -y && apt-get install -y docker-ce - name: Installing Rust toolchain uses: actions-rs/toolchain@v1 with: @@ -154,15 +160,7 @@ jobs: profile: minimal target: ${{ matrix.target }} override: true - - name: APT update - run: | - sudo apt update - - name: Install target specific tools - if: matrix.use-cross - run: | - sudo apt-get install -y ${{ matrix.linker }} - name: Configure target aarch64 GNU - if: matrix.target == 'aarch64-unknown-linux-gnu' ## Environment variable is not passed using env: ## LD gold won't work with MUSL # env: @@ -176,8 +174,10 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - use-cross: ${{ matrix.use-cross }} + use-cross: true args: --release --target ${{ matrix.target }} + env: + CROSS_DOCKER_IN_DOCKER: true - name: List target output files run: ls -lR ./target - name: Upload the binary to release From b4b859ec8c2a25ca502af48afaf5fd5e25fcab09 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 9 Mar 2023 10:56:17 +0100 Subject: [PATCH 16/29] Fix typos --- meilisearch/src/search.rs | 8 ++++---- milli/src/index.rs | 2 +- .../extract/extract_docid_word_positions.rs | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs index ebf9ace1f..7e4a7da6a 100644 --- a/meilisearch/src/search.rs +++ b/meilisearch/src/search.rs @@ -375,15 +375,15 @@ pub fn perform_search( &displayed_ids, ); - let mut tokenizer_buidler = TokenizerBuilder::default(); - tokenizer_buidler.create_char_map(true); + let mut tokenizer_builder = TokenizerBuilder::default(); + tokenizer_builder.create_char_map(true); let script_lang_map = index.script_language(&rtxn)?; if !script_lang_map.is_empty() { - tokenizer_buidler.allow_list(&script_lang_map); + tokenizer_builder.allow_list(&script_lang_map); } - let mut formatter_builder = MatcherBuilder::new(matching_words, tokenizer_buidler.build()); + let mut formatter_builder = MatcherBuilder::new(matching_words, tokenizer_builder.build()); formatter_builder.crop_marker(query.crop_marker); formatter_builder.highlight_prefix(query.highlight_pre_tag); formatter_builder.highlight_suffix(query.highlight_post_tag); diff --git a/milli/src/index.rs b/milli/src/index.rs index 7a473c0b4..20e64f984 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -1224,7 +1224,7 @@ impl Index { } } - let threshold = total / 20; // 5% (arbitrar) + let threshold = total / 20; // 5% (arbitrary) for (script, language, count) in script_language_doc_count { if count > threshold { if let Some(languages) = script_language.get_mut(&script) { diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 6eee90c06..56b1299d5 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -89,7 +89,7 @@ pub fn extract_docid_word_positions( // if the allow list is empty, meaning that no Language is considered frequent, // then we don't rerun the extraction. if !script_language.is_empty() { - // build a new temporar tokenizer including the allow list. + // build a new temporary tokenizer including the allow list. let mut tokenizer_builder = TokenizerBuilder::new(); if let Some(stop_words) = stop_words { tokenizer_builder.stop_words(stop_words); @@ -260,7 +260,7 @@ fn process_tokens<'a>( fn potential_language_detection_error(languages_frequency: &Vec<(Language, usize)>) -> bool { if languages_frequency.len() > 1 { - let threshold = compute_laguage_frequency_threshold(languages_frequency); + let threshold = compute_language_frequency_threshold(languages_frequency); languages_frequency.iter().any(|(_, c)| *c <= threshold) } else { false @@ -271,7 +271,7 @@ fn most_frequent_languages( (script, languages_frequency): (&Script, &Vec<(Language, usize)>), ) -> Option<(Script, Vec)> { if languages_frequency.len() > 1 { - let threshold = compute_laguage_frequency_threshold(languages_frequency); + let threshold = compute_language_frequency_threshold(languages_frequency); let languages: Vec<_> = languages_frequency.iter().filter(|(_, c)| *c > threshold).map(|(l, _)| *l).collect(); @@ -286,7 +286,7 @@ fn most_frequent_languages( } } -fn compute_laguage_frequency_threshold(languages_frequency: &[(Language, usize)]) -> usize { +fn compute_language_frequency_threshold(languages_frequency: &[(Language, usize)]) -> usize { let total: usize = languages_frequency.iter().map(|(_, c)| c).sum(); - total / 10 // 10% is a completely arbitrar value. + total / 10 // 10% is a completely arbitrary value. } From 5deea631ea3aed6d0ded1a73abc472d6d1aafc09 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 9 Mar 2023 11:19:13 +0100 Subject: [PATCH 17/29] fix clippy too many arguments --- .../extract/extract_docid_word_positions.rs | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 56b1299d5..3e1af5915 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -45,8 +45,7 @@ pub fn extract_docid_word_positions( max_memory, ); - let mut key_buffer = Vec::new(); - let mut field_buffer = String::new(); + let mut buffers = Buffers::default(); let mut tokenizer_builder = TokenizerBuilder::new(); if let Some(stop_words) = stop_words { tokenizer_builder.stop_words(stop_words); @@ -62,8 +61,8 @@ pub fn extract_docid_word_positions( let obkv = KvReader::::new(value); documents_ids.push(document_id); - key_buffer.clear(); - key_buffer.extend_from_slice(&document_id.to_be_bytes()); + buffers.key_buffer.clear(); + buffers.key_buffer.extend_from_slice(&document_id.to_be_bytes()); let mut script_language_word_count = HashMap::new(); @@ -72,8 +71,7 @@ pub fn extract_docid_word_positions( searchable_fields, &tokenizer, max_positions_per_attributes, - &mut key_buffer, - &mut field_buffer, + &mut buffers, &mut script_language_word_count, &mut docid_word_positions_sorter, )?; @@ -105,8 +103,7 @@ pub fn extract_docid_word_positions( searchable_fields, &tokenizer, max_positions_per_attributes, - &mut key_buffer, - &mut field_buffer, + &mut buffers, &mut script_language_word_count, &mut docid_word_positions_sorter, )?; @@ -127,22 +124,20 @@ pub fn extract_docid_word_positions( .map(|reader| (documents_ids, reader, script_language_docids)) } -#[allow(clippy::too_many_arguments)] fn extract_tokens_from_document>( obkv: &KvReader, searchable_fields: &Option>, tokenizer: &Tokenizer, max_positions_per_attributes: u32, - key_buffer: &mut Vec, - field_buffer: &mut String, + buffers: &mut Buffers, script_language_word_count: &mut HashMap>, docid_word_positions_sorter: &mut grenad::Sorter, ) -> Result<()> { for (field_id, field_bytes) in obkv.iter() { if searchable_fields.as_ref().map_or(true, |sf| sf.contains(&field_id)) { let value = serde_json::from_slice(field_bytes).map_err(InternalError::SerdeJson)?; - field_buffer.clear(); - if let Some(field) = json_to_string(&value, field_buffer) { + buffers.field_buffer.clear(); + if let Some(field) = json_to_string(&value, &mut buffers.field_buffer) { let tokens = process_tokens(tokenizer.tokenize(field)) .take_while(|(p, _)| (*p as u32) < max_positions_per_attributes); @@ -159,14 +154,15 @@ fn extract_tokens_from_document>( } let token = token.lemma().trim(); if !token.is_empty() && token.len() <= MAX_WORD_LENGTH { - key_buffer.truncate(mem::size_of::()); - key_buffer.extend_from_slice(token.as_bytes()); + buffers.key_buffer.truncate(mem::size_of::()); + buffers.key_buffer.extend_from_slice(token.as_bytes()); let position: u16 = index .try_into() .map_err(|_| SerializationError::InvalidNumberSerialization)?; let position = absolute_from_relative_position(field_id, position); - docid_word_positions_sorter.insert(&key_buffer, position.to_ne_bytes())?; + docid_word_positions_sorter + .insert(&buffers.key_buffer, position.to_ne_bytes())?; } } } @@ -290,3 +286,9 @@ fn compute_language_frequency_threshold(languages_frequency: &[(Language, usize) let total: usize = languages_frequency.iter().map(|(_, c)| c).sum(); total / 10 // 10% is a completely arbitrary value. } + +#[derive(Default)] +struct Buffers { + key_buffer: Vec, + field_buffer: String, +} From dff2715ef3b7899fd53ab543deb3cf7e71d746a2 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 9 Mar 2023 11:28:10 +0100 Subject: [PATCH 18/29] Try removing needless collect --- meilisearch/src/routes/indexes/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index 487511da0..2b204ac65 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -101,7 +101,6 @@ pub async fn list_indexes( })?; // Won't cause to open all indexes because IndexView doesn't keep the `Index` opened. // error when trying to fix it: the trait `ExactSizeIterator` is not implemented for `Flatten>>` - #[allow(clippy::needless_collect)] let indexes: Vec = indexes.into_iter().flatten().collect(); let ret = paginate.as_pagination().auto_paginate_sized(indexes.into_iter()); From 6da54d0cb6648fdceb32b924064fcd94c1b448e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 Mar 2023 14:56:13 +0100 Subject: [PATCH 19/29] Add a test to fix a diacritic issue --- meilisearch/tests/search/mod.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/meilisearch/tests/search/mod.rs b/meilisearch/tests/search/mod.rs index 9a51be676..1e5c23a71 100644 --- a/meilisearch/tests/search/mod.rs +++ b/meilisearch/tests/search/mod.rs @@ -192,6 +192,31 @@ async fn test_kanji_language_detection() { .await; } +#[cfg(feature = "default")] +#[actix_rt::test] +async fn test_thai_language() { + let server = Server::new().await; + let index = server.index("test"); + + // We don't need documents, the issue is on the query side only. + let documents = json!([ + { "id": 0, "title": "สบู่สมุนไพรดอกดาวเรือง 100 กรัม จำนวน 6 ก้อน" }, + { "id": 1, "title": "สบู่สมุนไพรชาเขียว 100 กรัม จำนวน 6 ก้อน" }, + { "id": 2, "title": "สบู่สมุนไพรฝางแดงผสมว่านหางจรเข้ 100 กรัม จำนวน 6 ก้อน" } + ]); + index.add_documents(documents, None).await; + index.wait_task(0).await; + + index.update_settings(json!({"rankingRules": ["exactness"]})).await; + index.wait_task(1).await; + + index + .search(json!({"q": "สบู"}), |response, code| { + assert_eq!(code, 200, "{}", response); + }) + .await; +} + #[actix_rt::test] async fn search_multiple_params() { let server = Server::new().await; From 175e8a84959f79d9ac38a941610edaa8fb3ee795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 Mar 2023 14:57:30 +0100 Subject: [PATCH 20/29] Fix a diacritic issue --- milli/src/search/query_tree.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/milli/src/search/query_tree.rs b/milli/src/search/query_tree.rs index 541dd8f7a..50f16c2d9 100755 --- a/milli/src/search/query_tree.rs +++ b/milli/src/search/query_tree.rs @@ -792,6 +792,10 @@ where let mut peekable = query.peekable(); while let Some(token) = peekable.next() { + if token.lemma().is_empty() { + continue; + } + // early return if word limit is exceeded if primitive_query.len() >= parts_limit { return primitive_query; From dea101e3d927775c7717ceebd1720b843096e5d3 Mon Sep 17 00:00:00 2001 From: Many the fish Date: Thu, 9 Mar 2023 15:17:03 +0100 Subject: [PATCH 21/29] Update meilisearch/src/routes/indexes/mod.rs Co-authored-by: Louis Dureuil --- meilisearch/src/routes/indexes/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index 2b204ac65..c5c168786 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -100,7 +100,6 @@ pub async fn list_indexes( Ok(Some(IndexView::new(uid.to_string(), index)?)) })?; // Won't cause to open all indexes because IndexView doesn't keep the `Index` opened. - // error when trying to fix it: the trait `ExactSizeIterator` is not implemented for `Flatten>>` let indexes: Vec = indexes.into_iter().flatten().collect(); let ret = paginate.as_pagination().auto_paginate_sized(indexes.into_iter()); From 2f8eb4f54adc7986c93111127a14d22bf6ac7df1 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 9 Mar 2023 15:34:36 +0100 Subject: [PATCH 22/29] last PR fixes --- .../extract/extract_docid_word_positions.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 3e1af5915..131b78df9 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -79,7 +79,11 @@ pub fn extract_docid_word_positions( // if we detect a potetial mistake in the language detection, // we rerun the extraction forcing the tokenizer to detect the most frequently detected Languages. // context: https://github.com/meilisearch/meilisearch/issues/3565 - if script_language_word_count.values().any(potential_language_detection_error) { + if script_language_word_count + .values() + .map(Vec::as_slice) + .any(potential_language_detection_error) + { // build an allow list with the most frequent detected languages in the document. let script_language: HashMap<_, _> = script_language_word_count.iter().filter_map(most_frequent_languages).collect(); @@ -254,7 +258,7 @@ fn process_tokens<'a>( .filter(|(_, t)| t.is_word()) } -fn potential_language_detection_error(languages_frequency: &Vec<(Language, usize)>) -> bool { +fn potential_language_detection_error(languages_frequency: &[(Language, usize)]) -> bool { if languages_frequency.len() > 1 { let threshold = compute_language_frequency_threshold(languages_frequency); languages_frequency.iter().any(|(_, c)| *c <= threshold) @@ -289,6 +293,10 @@ fn compute_language_frequency_threshold(languages_frequency: &[(Language, usize) #[derive(Default)] struct Buffers { + // the key buffer is the concatenation of the internal document id with the field id. + // The buffer has to be completelly cleared between documents, + // and the field id part must be cleared between each field. key_buffer: Vec, + // the field buffer for each fields desserialization, and must be cleared between each field. field_buffer: String, } From a2b151e877eec9a2ef12b9c33c76c9abe468f3dd Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 21 Mar 2023 14:23:30 +0100 Subject: [PATCH 23/29] ensure that the task queue is correctly imported reduce the size of the snapshots file --- index-scheduler/src/lib.rs | 12 + meilisearch/tests/dumps/mod.rs | 388 ++++++++++++++++++ .../mod.rs/import_dump_v1_movie_raw/1.snap | 26 ++ .../mod.rs/import_dump_v1_movie_raw/2.snap | 26 ++ .../mod.rs/import_dump_v1_movie_raw/3.snap | 26 ++ .../mod.rs/import_dump_v1_movie_raw/4.snap | 26 ++ .../mod.rs/import_dump_v1_movie_raw/5.snap | 26 ++ .../mod.rs/import_dump_v1_movie_raw/6.snap | 26 ++ .../mod.rs/import_dump_v1_movie_raw/7.snap | 26 ++ .../import_dump_v1_movie_with_settings/1.snap | 26 ++ .../import_dump_v1_movie_with_settings/2.snap | 26 ++ .../import_dump_v1_movie_with_settings/3.snap | 46 +++ .../import_dump_v1_movie_with_settings/4.snap | 46 +++ .../import_dump_v1_movie_with_settings/5.snap | 46 +++ .../import_dump_v1_movie_with_settings/6.snap | 46 +++ .../import_dump_v1_movie_with_settings/7.snap | 46 +++ .../1.snap | 51 +++ .../2.snap | 26 ++ .../3.snap | 26 ++ .../4.snap | 26 ++ .../5.snap | 26 ++ .../6.snap | 26 ++ .../7.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/1.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/2.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/3.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/4.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/5.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/6.snap | 26 ++ .../mod.rs/import_dump_v2_movie_raw/7.snap | 26 ++ .../import_dump_v2_movie_with_settings/1.snap | 26 ++ .../import_dump_v2_movie_with_settings/2.snap | 26 ++ .../import_dump_v2_movie_with_settings/3.snap | 42 ++ .../import_dump_v2_movie_with_settings/4.snap | 42 ++ .../import_dump_v2_movie_with_settings/5.snap | 42 ++ .../import_dump_v2_movie_with_settings/6.snap | 42 ++ .../import_dump_v2_movie_with_settings/7.snap | 42 ++ .../1.snap | 47 +++ .../2.snap | 26 ++ .../3.snap | 26 ++ .../4.snap | 26 ++ .../5.snap | 26 ++ .../6.snap | 26 ++ .../7.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/1.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/2.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/3.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/4.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/5.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/6.snap | 26 ++ .../mod.rs/import_dump_v3_movie_raw/7.snap | 26 ++ .../import_dump_v3_movie_with_settings/1.snap | 26 ++ .../import_dump_v3_movie_with_settings/2.snap | 26 ++ .../import_dump_v3_movie_with_settings/3.snap | 42 ++ .../import_dump_v3_movie_with_settings/4.snap | 42 ++ .../import_dump_v3_movie_with_settings/5.snap | 42 ++ .../import_dump_v3_movie_with_settings/6.snap | 42 ++ .../import_dump_v3_movie_with_settings/7.snap | 42 ++ .../1.snap | 47 +++ .../2.snap | 26 ++ .../3.snap | 26 ++ .../4.snap | 26 ++ .../5.snap | 26 ++ .../6.snap | 26 ++ .../7.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/1.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/2.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/3.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/4.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/5.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/6.snap | 26 ++ .../mod.rs/import_dump_v4_movie_raw/7.snap | 26 ++ .../import_dump_v4_movie_with_settings/1.snap | 26 ++ .../import_dump_v4_movie_with_settings/2.snap | 26 ++ .../import_dump_v4_movie_with_settings/3.snap | 42 ++ .../import_dump_v4_movie_with_settings/4.snap | 42 ++ .../import_dump_v4_movie_with_settings/5.snap | 42 ++ .../import_dump_v4_movie_with_settings/6.snap | 42 ++ .../import_dump_v4_movie_with_settings/7.snap | 42 ++ .../1.snap | 47 +++ .../2.snap | 26 ++ .../3.snap | 26 ++ .../4.snap | 26 ++ .../5.snap | 26 ++ .../6.snap | 26 ++ .../7.snap | 26 ++ .../snapshots/mod.rs/import_dump_v5/1.snap | 26 ++ .../snapshots/mod.rs/import_dump_v5/2.snap | 26 ++ .../snapshots/mod.rs/import_dump_v5/3.snap | 25 ++ .../snapshots/mod.rs/import_dump_v5/4.snap | 30 ++ .../snapshots/mod.rs/import_dump_v5/5.snap | 25 ++ .../snapshots/mod.rs/import_dump_v5/6.snap | 25 ++ .../snapshots/mod.rs/import_dump_v5/7.snap | 25 ++ 93 files changed, 3194 insertions(+) create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/7.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/1.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/2.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/3.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/4.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/5.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/6.snap create mode 100644 meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/7.snap diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 7c5970fad..b402985e3 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -987,6 +987,18 @@ impl IndexScheduler { (bitmap.insert(task.uid)); })?; + utils::insert_task_datetime(&mut wtxn, self.enqueued_at, task.enqueued_at, task.uid)?; + + // we can't override the started_at & finished_at, so we must only set it if the tasks is finished and won't change + if matches!(task.status, Status::Succeeded | Status::Failed | Status::Canceled) { + if let Some(started_at) = task.started_at { + utils::insert_task_datetime(&mut wtxn, self.started_at, started_at, task.uid)?; + } + if let Some(finished_at) = task.finished_at { + utils::insert_task_datetime(&mut wtxn, self.finished_at, finished_at, task.uid)?; + } + } + wtxn.commit()?; self.wake_up.signal(); diff --git a/meilisearch/tests/dumps/mod.rs b/meilisearch/tests/dumps/mod.rs index cbc895f32..1deb2de2a 100644 --- a/meilisearch/tests/dumps/mod.rs +++ b/meilisearch/tests/dumps/mod.rs @@ -1,5 +1,6 @@ mod data; +use meili_snap::{json_string, snapshot}; use meilisearch::Opt; use serde_json::json; @@ -66,6 +67,35 @@ async fn import_dump_v1_movie_raw() { document, json!({"id": 10006, "title": "Wild Seven", "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "genres": ["Action", "Crime", "Drama"], "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -129,6 +159,35 @@ async fn import_dump_v1_movie_with_settings() { document, json!({ "id": 10006, "title": "Wild Seven", "genres": ["Action", "Crime", "Drama"], "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -192,6 +251,35 @@ async fn import_dump_v1_rubygems_with_settings() { document, json!({ "name": "vortex-of-agony", "summary": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "description": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "id": "159227", "version": "0.1.0", "total_downloads": "1007"}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=rubygems&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -253,6 +341,35 @@ async fn import_dump_v2_movie_raw() { document, json!({"id": 10006, "title": "Wild Seven", "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "genres": ["Action", "Crime", "Drama"], "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -316,6 +433,35 @@ async fn import_dump_v2_movie_with_settings() { document, json!({ "id": 10006, "title": "Wild Seven", "genres": ["Action", "Crime", "Drama"], "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -379,6 +525,35 @@ async fn import_dump_v2_rubygems_with_settings() { document, json!({ "name": "vortex-of-agony", "summary": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "description": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "id": "159227", "version": "0.1.0", "total_downloads": "1007"}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=rubygems&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -440,6 +615,35 @@ async fn import_dump_v3_movie_raw() { document, json!({"id": 10006, "title": "Wild Seven", "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "genres": ["Action", "Crime", "Drama"], "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -503,6 +707,35 @@ async fn import_dump_v3_movie_with_settings() { document, json!({ "id": 10006, "title": "Wild Seven", "genres": ["Action", "Crime", "Drama"], "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -566,6 +799,35 @@ async fn import_dump_v3_rubygems_with_settings() { document, json!({ "name": "vortex-of-agony", "summary": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "description": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "id": "159227", "version": "0.1.0", "total_downloads": "1007"}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=rubygems&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -627,6 +889,35 @@ async fn import_dump_v4_movie_raw() { document, json!({ "id": 10006, "title": "Wild Seven", "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "genres": ["Action", "Crime", "Drama"], "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -690,6 +981,35 @@ async fn import_dump_v4_movie_with_settings() { document, json!({ "id": 10006, "title": "Wild Seven", "genres": ["Action", "Crime", "Drama"], "overview": "In this darkly karmic vision of Arizona, a man who breathes nothing but ill will begins a noxious domino effect as quickly as an uncontrollable virus kills. As he exits Arizona State Penn after twenty-one long years, Wilson has only one thing on the brain, leveling the score with career criminal, Mackey Willis.", "poster": "https://image.tmdb.org/t/p/w500/y114dTPoqn8k2Txps4P2tI95YCS.jpg", "release_date": 1136073600}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=indexUID&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -753,6 +1073,35 @@ async fn import_dump_v4_rubygems_with_settings() { document, json!({ "name": "vortex-of-agony", "summary": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "description": "You dont need to use nodejs or go, just install this plugin. It will crash your application at random", "id": "159227", "version": "0.1.0", "total_downloads": "1007"}) ); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("indexUids=rubygems&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); } #[actix_rt::test] @@ -816,4 +1165,43 @@ async fn import_dump_v5() { let key = &keys["results"][0]; assert_eq!(key["name"], "my key"); + + // We're going to ensure that every reverse index of the task queue has been well built while importing the dump + let (tasks, code) = server.tasks_filter("uids=0&limit=1&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("types=documentAdditionOrUpdate&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!(json_string!(tasks)); + + let (tasks, code) = server.tasks_filter("statuses=succeeded&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!( + json_string!(tasks, { ".results[].details.dumpUid" => "[uid]", ".results[].duration" => "[duration]" , ".results[].startedAt" => "[date]" , ".results[].finishedAt" => "[date]" }) + ); + + let (tasks, code) = server.tasks_filter("indexUids=test&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!( + json_string!(tasks, { ".results[].details.dumpUid" => "[uid]", ".results[].duration" => "[duration]" , ".results[].startedAt" => "[date]" , ".results[].finishedAt" => "[date]" }) + ); + + let (tasks, code) = server.tasks_filter("afterEnqueuedAt=2021-09-05&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!( + json_string!(tasks, { ".results[].details.dumpUid" => "[uid]", ".results[].duration" => "[duration]" , ".results[].startedAt" => "[date]" , ".results[].finishedAt" => "[date]" }) + ); + + let (tasks, code) = server.tasks_filter("afterStartedAt=2021-09-06&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!( + json_string!(tasks, { ".results[].details.dumpUid" => "[uid]", ".results[].duration" => "[duration]" , ".results[].startedAt" => "[date]" , ".results[].finishedAt" => "[date]" }) + ); + + let (tasks, code) = server.tasks_filter("afterFinishedAt=2021-09-07&limit=1").await; + snapshot!(code, @"200 OK"); + snapshot!( + json_string!(tasks, { ".results[].details.dumpUid" => "[uid]", ".results[].duration" => "[duration]" , ".results[].startedAt" => "[date]" , ".results[].finishedAt" => "[date]" }) + ); } diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/1.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/2.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/3.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/4.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/5.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/6.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/7.snap new file mode 100644 index 000000000..f062ee002 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_raw/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.317060500S", + "enqueuedAt": "2021-09-08T09:08:45.153219Z", + "startedAt": "2021-09-08T09:08:45.3961665Z", + "finishedAt": "2021-09-08T09:08:54.713227Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/1.snap new file mode 100644 index 000000000..986b71132 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.090735774S", + "enqueuedAt": "2021-09-08T09:34:16.036101Z", + "startedAt": "2021-09-08T09:34:16.261191226Z", + "finishedAt": "2021-09-08T09:34:25.351927Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/2.snap new file mode 100644 index 000000000..986b71132 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31968 + }, + "error": null, + "duration": "PT9.090735774S", + "enqueuedAt": "2021-09-08T09:34:16.036101Z", + "startedAt": "2021-09-08T09:34:16.261191226Z", + "finishedAt": "2021-09-08T09:34:25.351927Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/3.snap new file mode 100644 index 000000000..e2e059fac --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/3.snap @@ -0,0 +1,46 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "genres", + "id", + "overview", + "poster", + "release_date", + "title" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "sortableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT7.288826907S", + "enqueuedAt": "2021-09-08T09:34:40.882977Z", + "startedAt": "2021-09-08T09:34:40.883073093Z", + "finishedAt": "2021-09-08T09:34:48.1719Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/4.snap new file mode 100644 index 000000000..e2e059fac --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/4.snap @@ -0,0 +1,46 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "genres", + "id", + "overview", + "poster", + "release_date", + "title" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "sortableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT7.288826907S", + "enqueuedAt": "2021-09-08T09:34:40.882977Z", + "startedAt": "2021-09-08T09:34:40.883073093Z", + "finishedAt": "2021-09-08T09:34:48.1719Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/5.snap new file mode 100644 index 000000000..e2e059fac --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/5.snap @@ -0,0 +1,46 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "genres", + "id", + "overview", + "poster", + "release_date", + "title" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "sortableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT7.288826907S", + "enqueuedAt": "2021-09-08T09:34:40.882977Z", + "startedAt": "2021-09-08T09:34:40.883073093Z", + "finishedAt": "2021-09-08T09:34:48.1719Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/6.snap new file mode 100644 index 000000000..e2e059fac --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/6.snap @@ -0,0 +1,46 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "genres", + "id", + "overview", + "poster", + "release_date", + "title" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "sortableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT7.288826907S", + "enqueuedAt": "2021-09-08T09:34:40.882977Z", + "startedAt": "2021-09-08T09:34:40.883073093Z", + "finishedAt": "2021-09-08T09:34:48.1719Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/7.snap new file mode 100644 index 000000000..e2e059fac --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_movie_with_settings/7.snap @@ -0,0 +1,46 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "genres", + "id", + "overview", + "poster", + "release_date", + "title" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "sortableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT7.288826907S", + "enqueuedAt": "2021-09-08T09:34:40.882977Z", + "startedAt": "2021-09-08T09:34:40.883073093Z", + "finishedAt": "2021-09-08T09:34:48.1719Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/1.snap new file mode 100644 index 000000000..84a9c4fd5 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/1.snap @@ -0,0 +1,51 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "rubygems", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "description", + "id", + "name", + "summary", + "total_downloads", + "version" + ], + "searchableAttributes": [ + "name", + "summary" + ], + "filterableAttributes": [ + "version" + ], + "sortableAttributes": [ + "version" + ], + "rankingRules": [ + "typo", + "words", + "fame:desc", + "proximity", + "attribute", + "exactness", + "total_downloads:desc" + ] + }, + "error": null, + "duration": "PT0.000988440S", + "enqueuedAt": "2021-09-08T09:26:57.317704Z", + "startedAt": "2021-09-08T09:26:57.31809456Z", + "finishedAt": "2021-09-08T09:26:57.319083Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/2.snap new file mode 100644 index 000000000..fa8a9305b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT1.487793839S", + "enqueuedAt": "2021-09-08T09:27:01.465296Z", + "startedAt": "2021-09-08T09:28:44.882177161Z", + "finishedAt": "2021-09-08T09:28:46.369971Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/3.snap new file mode 100644 index 000000000..fa8a9305b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT1.487793839S", + "enqueuedAt": "2021-09-08T09:27:01.465296Z", + "startedAt": "2021-09-08T09:28:44.882177161Z", + "finishedAt": "2021-09-08T09:28:46.369971Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/4.snap new file mode 100644 index 000000000..fa8a9305b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT1.487793839S", + "enqueuedAt": "2021-09-08T09:27:01.465296Z", + "startedAt": "2021-09-08T09:28:44.882177161Z", + "finishedAt": "2021-09-08T09:28:46.369971Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/5.snap new file mode 100644 index 000000000..fa8a9305b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT1.487793839S", + "enqueuedAt": "2021-09-08T09:27:01.465296Z", + "startedAt": "2021-09-08T09:28:44.882177161Z", + "finishedAt": "2021-09-08T09:28:46.369971Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/6.snap new file mode 100644 index 000000000..fa8a9305b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT1.487793839S", + "enqueuedAt": "2021-09-08T09:27:01.465296Z", + "startedAt": "2021-09-08T09:28:44.882177161Z", + "finishedAt": "2021-09-08T09:28:46.369971Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/7.snap new file mode 100644 index 000000000..fa8a9305b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v1_rubygems_with_settings/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT1.487793839S", + "enqueuedAt": "2021-09-08T09:27:01.465296Z", + "startedAt": "2021-09-08T09:28:44.882177161Z", + "finishedAt": "2021-09-08T09:28:46.369971Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/1.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/2.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/3.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/4.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/5.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/6.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/7.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_raw/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/1.snap new file mode 100644 index 000000000..17dc6a4ee --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT39.941318S", + "enqueuedAt": "2021-09-08T08:21:14.742672Z", + "startedAt": "2021-09-08T08:21:14.750166Z", + "finishedAt": "2021-09-08T08:21:54.691484Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/2.snap new file mode 100644 index 000000000..17dc6a4ee --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT39.941318S", + "enqueuedAt": "2021-09-08T08:21:14.742672Z", + "startedAt": "2021-09-08T08:21:14.750166Z", + "finishedAt": "2021-09-08T08:21:54.691484Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/3.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/3.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/4.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/4.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/5.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/5.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/6.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/6.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/7.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_movie_with_settings/7.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/1.snap new file mode 100644 index 000000000..00d18a4f0 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/1.snap @@ -0,0 +1,47 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "rubygems", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "name", + "summary", + "description", + "version", + "total_downloads" + ], + "searchableAttributes": [ + "name", + "summary" + ], + "filterableAttributes": [ + "version" + ], + "rankingRules": [ + "typo", + "words", + "fame:desc", + "proximity", + "attribute", + "exactness", + "total_downloads:desc" + ] + }, + "error": null, + "duration": "PT0.008886S", + "enqueuedAt": "2021-09-08T08:40:28.660188Z", + "startedAt": "2021-09-08T08:40:28.660766Z", + "finishedAt": "2021-09-08T08:40:28.669652Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/2.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/3.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/4.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/5.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/6.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/7.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v2_rubygems_with_settings/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/1.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/2.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/3.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/4.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/5.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/6.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/7.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_raw/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/1.snap new file mode 100644 index 000000000..17dc6a4ee --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT39.941318S", + "enqueuedAt": "2021-09-08T08:21:14.742672Z", + "startedAt": "2021-09-08T08:21:14.750166Z", + "finishedAt": "2021-09-08T08:21:54.691484Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/2.snap new file mode 100644 index 000000000..17dc6a4ee --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT39.941318S", + "enqueuedAt": "2021-09-08T08:21:14.742672Z", + "startedAt": "2021-09-08T08:21:14.750166Z", + "finishedAt": "2021-09-08T08:21:54.691484Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/3.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/3.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/4.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/4.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/5.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/5.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/6.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/6.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/7.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_movie_with_settings/7.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/1.snap new file mode 100644 index 000000000..00d18a4f0 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/1.snap @@ -0,0 +1,47 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "rubygems", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "name", + "summary", + "description", + "version", + "total_downloads" + ], + "searchableAttributes": [ + "name", + "summary" + ], + "filterableAttributes": [ + "version" + ], + "rankingRules": [ + "typo", + "words", + "fame:desc", + "proximity", + "attribute", + "exactness", + "total_downloads:desc" + ] + }, + "error": null, + "duration": "PT0.008886S", + "enqueuedAt": "2021-09-08T08:40:28.660188Z", + "startedAt": "2021-09-08T08:40:28.660766Z", + "finishedAt": "2021-09-08T08:40:28.669652Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/2.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/3.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/4.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/5.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/6.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/7.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v3_rubygems_with_settings/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/1.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/2.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/3.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/4.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/5.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/6.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/7.snap new file mode 100644 index 000000000..6fb6c0e80 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_raw/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT41.751156S", + "enqueuedAt": "2021-09-08T08:30:30.550282Z", + "startedAt": "2021-09-08T08:30:30.553012Z", + "finishedAt": "2021-09-08T08:31:12.304168Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/1.snap new file mode 100644 index 000000000..17dc6a4ee --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT39.941318S", + "enqueuedAt": "2021-09-08T08:21:14.742672Z", + "startedAt": "2021-09-08T08:21:14.750166Z", + "finishedAt": "2021-09-08T08:21:54.691484Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/2.snap new file mode 100644 index 000000000..17dc6a4ee --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "indexUID", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 31944 + }, + "error": null, + "duration": "PT39.941318S", + "enqueuedAt": "2021-09-08T08:21:14.742672Z", + "startedAt": "2021-09-08T08:21:14.750166Z", + "finishedAt": "2021-09-08T08:21:54.691484Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/3.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/3.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/4.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/4.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/5.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/5.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/6.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/6.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/7.snap new file mode 100644 index 000000000..4253f1d0e --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_movie_with_settings/7.snap @@ -0,0 +1,42 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "indexUID", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "title", + "genres", + "overview", + "poster", + "release_date" + ], + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres" + ], + "stopWords": [ + "of", + "the" + ] + }, + "error": null, + "duration": "PT37.488777S", + "enqueuedAt": "2021-09-08T08:24:02.323444Z", + "startedAt": "2021-09-08T08:24:02.324145Z", + "finishedAt": "2021-09-08T08:24:39.812922Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/1.snap new file mode 100644 index 000000000..00d18a4f0 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/1.snap @@ -0,0 +1,47 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "rubygems", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "displayedAttributes": [ + "name", + "summary", + "description", + "version", + "total_downloads" + ], + "searchableAttributes": [ + "name", + "summary" + ], + "filterableAttributes": [ + "version" + ], + "rankingRules": [ + "typo", + "words", + "fame:desc", + "proximity", + "attribute", + "exactness", + "total_downloads:desc" + ] + }, + "error": null, + "duration": "PT0.008886S", + "enqueuedAt": "2021-09-08T08:40:28.660188Z", + "startedAt": "2021-09-08T08:40:28.660766Z", + "finishedAt": "2021-09-08T08:40:28.669652Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/2.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/3.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/3.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/4.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/4.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/5.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/5.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/6.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/6.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/7.snap new file mode 100644 index 000000000..6a2fbe74f --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v4_rubygems_with_settings/7.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 92, + "indexUid": "rubygems", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 0, + "indexedDocuments": 1042 + }, + "error": null, + "duration": "PT14.034672S", + "enqueuedAt": "2021-09-08T08:40:31.390775Z", + "startedAt": "2021-09-08T08:51:39.060642Z", + "finishedAt": "2021-09-08T08:51:53.095314Z" + } + ], + "limit": 1, + "from": 92, + "next": 91 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/1.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/1.snap new file mode 100644 index 000000000..4ca8cbba0 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/1.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 0, + "indexUid": "test", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 10, + "indexedDocuments": 10 + }, + "error": null, + "duration": "PT0.079460S", + "enqueuedAt": "2022-06-08T14:59:24.724025Z", + "startedAt": "2022-06-08T14:59:24.724983Z", + "finishedAt": "2022-06-08T14:59:24.804443Z" + } + ], + "limit": 1, + "from": 0, + "next": null +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/2.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/2.snap new file mode 100644 index 000000000..a5cee8ace --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/2.snap @@ -0,0 +1,26 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 1, + "indexUid": "test2", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 10, + "indexedDocuments": 10 + }, + "error": null, + "duration": "PT0.076765S", + "enqueuedAt": "2022-06-08T14:59:29.920479Z", + "startedAt": "2022-06-08T14:59:29.921016Z", + "finishedAt": "2022-06-08T14:59:29.997781Z" + } + ], + "limit": 1, + "from": 1, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/3.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/3.snap new file mode 100644 index 000000000..29b42313b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/3.snap @@ -0,0 +1,25 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 4, + "indexUid": null, + "status": "succeeded", + "type": "dumpCreation", + "canceledBy": null, + "details": { + "dumpUid": "[uid]" + }, + "error": null, + "duration": "[duration]", + "enqueuedAt": "2022-06-08T15:11:40.604805Z", + "startedAt": "[date]", + "finishedAt": "[date]" + } + ], + "limit": 1, + "from": 4, + "next": 3 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/4.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/4.snap new file mode 100644 index 000000000..9e63e3340 --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/4.snap @@ -0,0 +1,30 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 2, + "indexUid": "test", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "typoTolerance": { + "minWordSizeForTypos": { + "oneTypo": 10, + "twoTypos": 17 + } + } + }, + "error": null, + "duration": "[duration]", + "enqueuedAt": "2022-06-08T15:01:14.794184Z", + "startedAt": "[date]", + "finishedAt": "[date]" + } + ], + "limit": 1, + "from": 2, + "next": 0 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/5.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/5.snap new file mode 100644 index 000000000..29b42313b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/5.snap @@ -0,0 +1,25 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 4, + "indexUid": null, + "status": "succeeded", + "type": "dumpCreation", + "canceledBy": null, + "details": { + "dumpUid": "[uid]" + }, + "error": null, + "duration": "[duration]", + "enqueuedAt": "2022-06-08T15:11:40.604805Z", + "startedAt": "[date]", + "finishedAt": "[date]" + } + ], + "limit": 1, + "from": 4, + "next": 3 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/6.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/6.snap new file mode 100644 index 000000000..29b42313b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/6.snap @@ -0,0 +1,25 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 4, + "indexUid": null, + "status": "succeeded", + "type": "dumpCreation", + "canceledBy": null, + "details": { + "dumpUid": "[uid]" + }, + "error": null, + "duration": "[duration]", + "enqueuedAt": "2022-06-08T15:11:40.604805Z", + "startedAt": "[date]", + "finishedAt": "[date]" + } + ], + "limit": 1, + "from": 4, + "next": 3 +} diff --git a/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/7.snap b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/7.snap new file mode 100644 index 000000000..29b42313b --- /dev/null +++ b/meilisearch/tests/dumps/snapshots/mod.rs/import_dump_v5/7.snap @@ -0,0 +1,25 @@ +--- +source: meilisearch/tests/dumps/mod.rs +--- +{ + "results": [ + { + "uid": 4, + "indexUid": null, + "status": "succeeded", + "type": "dumpCreation", + "canceledBy": null, + "details": { + "dumpUid": "[uid]" + }, + "error": null, + "duration": "[duration]", + "enqueuedAt": "2022-06-08T15:11:40.604805Z", + "startedAt": "[date]", + "finishedAt": "[date]" + } + ], + "limit": 1, + "from": 4, + "next": 3 +} From a50b058557bbd77ec2a7038f887aa14c76c288f4 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 28 Mar 2023 18:26:18 +0200 Subject: [PATCH 24/29] update the geoBoundingBox feature Now instead of using the (top_left, bottom_right) corners of the bounding box it s using the (top_right, bottom_left) corners. --- filter-parser/src/lib.rs | 11 ++-- milli/src/index.rs | 24 +++++---- milli/src/search/facet/filter.rs | 86 +++++++++++++++++--------------- 3 files changed, 68 insertions(+), 53 deletions(-) diff --git a/filter-parser/src/lib.rs b/filter-parser/src/lib.rs index 8e21ff6be..d03d187fb 100644 --- a/filter-parser/src/lib.rs +++ b/filter-parser/src/lib.rs @@ -141,7 +141,7 @@ pub enum FilterCondition<'a> { Or(Vec), And(Vec), GeoLowerThan { point: [Token<'a>; 2], radius: Token<'a> }, - GeoBoundingBox { top_left_point: [Token<'a>; 2], bottom_right_point: [Token<'a>; 2] }, + GeoBoundingBox { top_right_point: [Token<'a>; 2], bottom_left_point: [Token<'a>; 2] }, } impl<'a> FilterCondition<'a> { @@ -362,8 +362,8 @@ fn parse_geo_bounding_box(input: Span) -> IResult { } let res = FilterCondition::GeoBoundingBox { - top_left_point: [args[0][0].into(), args[0][1].into()], - bottom_right_point: [args[1][0].into(), args[1][1].into()], + top_right_point: [args[0][0].into(), args[0][1].into()], + bottom_left_point: [args[1][0].into(), args[1][1].into()], }; Ok((input, res)) } @@ -780,7 +780,10 @@ impl<'a> std::fmt::Display for FilterCondition<'a> { FilterCondition::GeoLowerThan { point, radius } => { write!(f, "_geoRadius({}, {}, {})", point[0], point[1], radius) } - FilterCondition::GeoBoundingBox { top_left_point, bottom_right_point } => { + FilterCondition::GeoBoundingBox { + top_right_point: top_left_point, + bottom_left_point: bottom_right_point, + } => { write!( f, "_geoBoundingBox([{}, {}], [{}, {}])", diff --git a/milli/src/index.rs b/milli/src/index.rs index 20e64f984..acb2a0a9d 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -1586,35 +1586,35 @@ pub(crate) mod tests { // match a document in the middle of the rectangle let search_result = search - .filter(Filter::from_str("_geoBoundingBox([10, -10], [-10, 10])").unwrap().unwrap()) + .filter(Filter::from_str("_geoBoundingBox([10, 10], [-10, -10])").unwrap().unwrap()) .execute() .unwrap(); insta::assert_debug_snapshot!(search_result.candidates, @"RoaringBitmap<[0]>"); // select everything let search_result = search - .filter(Filter::from_str("_geoBoundingBox([90, -180], [-90, 180])").unwrap().unwrap()) + .filter(Filter::from_str("_geoBoundingBox([90, 180], [-90, -180])").unwrap().unwrap()) .execute() .unwrap(); insta::assert_debug_snapshot!(search_result.candidates, @"RoaringBitmap<[0, 1, 2, 3, 4]>"); // go on the edge of the longitude let search_result = search - .filter(Filter::from_str("_geoBoundingBox([0, 180], [0, -170])").unwrap().unwrap()) + .filter(Filter::from_str("_geoBoundingBox([0, -170], [0, 180])").unwrap().unwrap()) .execute() .unwrap(); insta::assert_debug_snapshot!(search_result.candidates, @"RoaringBitmap<[1]>"); // go on the other edge of the longitude let search_result = search - .filter(Filter::from_str("_geoBoundingBox([0, 170], [0, -180])").unwrap().unwrap()) + .filter(Filter::from_str("_geoBoundingBox([0, -180], [0, 170])").unwrap().unwrap()) .execute() .unwrap(); insta::assert_debug_snapshot!(search_result.candidates, @"RoaringBitmap<[2]>"); // wrap around the longitude let search_result = search - .filter(Filter::from_str("_geoBoundingBox([0, 170], [0, -170])").unwrap().unwrap()) + .filter(Filter::from_str("_geoBoundingBox([0, -170], [0, 170])").unwrap().unwrap()) .execute() .unwrap(); insta::assert_debug_snapshot!(search_result.candidates, @"RoaringBitmap<[1, 2]>"); @@ -1640,20 +1640,26 @@ pub(crate) mod tests { .filter(Filter::from_str("_geoBoundingBox([-80, 0], [80, 0])").unwrap().unwrap()) .execute() .unwrap_err(); - insta::assert_display_snapshot!(error, @r###" + insta::assert_display_snapshot!( + error, + @r###" The top latitude `-80` is below the bottom latitude `80`. 32:33 _geoBoundingBox([-80, 0], [80, 0]) - "###); + "### + ); // send a top latitude lower than the bottow latitude let error = search .filter(Filter::from_str("_geoBoundingBox([-10, 0], [10, 0])").unwrap().unwrap()) .execute() .unwrap_err(); - insta::assert_display_snapshot!(error, @r###" + insta::assert_display_snapshot!( + error, + @r###" The top latitude `-10` is below the bottom latitude `10`. 32:33 _geoBoundingBox([-10, 0], [10, 0]) - "###); + "### + ); } #[test] diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index a4ac53950..f67219494 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -419,54 +419,56 @@ impl<'a> Filter<'a> { }))? } } - FilterCondition::GeoBoundingBox { top_left_point, bottom_right_point } => { + FilterCondition::GeoBoundingBox { top_right_point, bottom_left_point } => { if filterable_fields.contains("_geo") { - let top_left: [f64; 2] = [ - top_left_point[0].parse_finite_float()?, - top_left_point[1].parse_finite_float()?, + let top_right: [f64; 2] = [ + top_right_point[0].parse_finite_float()?, + top_right_point[1].parse_finite_float()?, ]; - let bottom_right: [f64; 2] = [ - bottom_right_point[0].parse_finite_float()?, - bottom_right_point[1].parse_finite_float()?, + let bottom_left: [f64; 2] = [ + bottom_left_point[0].parse_finite_float()?, + bottom_left_point[1].parse_finite_float()?, ]; - if !(-90.0..=90.0).contains(&top_left[0]) { + if !(-90.0..=90.0).contains(&top_right[0]) { return Err( - top_left_point[0].as_external_error(BadGeoError::Lat(top_left[0])) + top_right_point[0].as_external_error(BadGeoError::Lat(top_right[0])) )?; } - if !(-180.0..=180.0).contains(&top_left[1]) { + if !(-180.0..=180.0).contains(&top_right[1]) { return Err( - top_left_point[1].as_external_error(BadGeoError::Lng(top_left[1])) + top_right_point[1].as_external_error(BadGeoError::Lng(top_right[1])) )?; } - if !(-90.0..=90.0).contains(&bottom_right[0]) { - return Err(bottom_right_point[0] - .as_external_error(BadGeoError::Lat(bottom_right[0])))?; + if !(-90.0..=90.0).contains(&bottom_left[0]) { + return Err(bottom_left_point[0] + .as_external_error(BadGeoError::Lat(bottom_left[0])))?; } - if !(-180.0..=180.0).contains(&bottom_right[1]) { - return Err(bottom_right_point[1] - .as_external_error(BadGeoError::Lng(bottom_right[1])))?; + if !(-180.0..=180.0).contains(&bottom_left[1]) { + return Err(bottom_left_point[1] + .as_external_error(BadGeoError::Lng(bottom_left[1])))?; } - if top_left[0] < bottom_right[0] { - return Err(bottom_right_point[1].as_external_error( - BadGeoError::BoundingBoxTopIsBelowBottom(top_left[0], bottom_right[0]), + if top_right[0] < bottom_left[0] { + return Err(bottom_left_point[1].as_external_error( + BadGeoError::BoundingBoxTopIsBelowBottom(top_right[0], bottom_left[0]), ))?; } // Instead of writing a custom `GeoBoundingBox` filter we're simply going to re-use the range // filter to create the following filter; - // `_geo.lat {top_left[0]} TO {bottom_right[0]} AND _geo.lng {top_left[1]} TO {bottom_right[1]}` + // `_geo.lat {top_right[0]} TO {bottom_left[0]} AND _geo.lng {top_right[1]} TO {bottom_left[1]}` // As we can see, we need to use a bunch of tokens that don't exist in the original filter, // thus we're going to create tokens that point to a random span but contain our text. - let geo_lat_token = - Token::new(top_left_point[0].original_span(), Some("_geo.lat".to_string())); + let geo_lat_token = Token::new( + top_right_point[0].original_span(), + Some("_geo.lat".to_string()), + ); let condition_lat = FilterCondition::Condition { fid: geo_lat_token, op: Condition::Between { - from: bottom_right_point[0].clone(), - to: top_left_point[0].clone(), + from: bottom_left_point[0].clone(), + to: top_right_point[0].clone(), }, }; @@ -476,27 +478,29 @@ impl<'a> Filter<'a> { filterable_fields, )?; - let geo_lng_token = - Token::new(top_left_point[1].original_span(), Some("_geo.lng".to_string())); - let selected_lng = if top_left[1] > bottom_right[1] { + let geo_lng_token = Token::new( + top_right_point[1].original_span(), + Some("_geo.lng".to_string()), + ); + let selected_lng = if top_right[1] < bottom_left[1] { // In this case the bounding box is wrapping around the earth (going from 180 to -180). // We need to update the lng part of the filter from; - // `_geo.lng {top_left[1]} TO {bottom_right[1]}` to - // `_geo.lng {top_left[1]} TO 180 AND _geo.lng -180 TO {bottom_right[1]}` + // `_geo.lng {top_right[1]} TO {bottom_left[1]}` to + // `_geo.lng {bottom_left[1]} TO 180 AND _geo.lng -180 TO {top_right[1]}` let min_lng_token = Token::new( - top_left_point[1].original_span(), + top_right_point[1].original_span(), Some("-180.0".to_string()), ); let max_lng_token = Token::new( - top_left_point[1].original_span(), + top_right_point[1].original_span(), Some("180.0".to_string()), ); let condition_left = FilterCondition::Condition { fid: geo_lng_token.clone(), op: Condition::Between { - from: top_left_point[1].clone(), + from: bottom_left_point[1].clone(), to: max_lng_token, }, }; @@ -510,7 +514,7 @@ impl<'a> Filter<'a> { fid: geo_lng_token, op: Condition::Between { from: min_lng_token, - to: bottom_right_point[1].clone(), + to: top_right_point[1].clone(), }, }; let right = Filter { condition: condition_right }.inner_evaluate( @@ -524,8 +528,8 @@ impl<'a> Filter<'a> { let condition_lng = FilterCondition::Condition { fid: geo_lng_token, op: Condition::Between { - from: top_left_point[1].clone(), - to: bottom_right_point[1].clone(), + from: bottom_left_point[1].clone(), + to: top_right_point[1].clone(), }, }; Filter { condition: condition_lng }.inner_evaluate( @@ -537,10 +541,12 @@ impl<'a> Filter<'a> { Ok(selected_lat & selected_lng) } else { - Err(top_left_point[0].as_external_error(FilterError::AttributeNotFilterable { - attribute: "_geo", - filterable_fields: filterable_fields.clone(), - }))? + Err(top_right_point[0].as_external_error( + FilterError::AttributeNotFilterable { + attribute: "_geo", + filterable_fields: filterable_fields.clone(), + }, + ))? } } } From b744f335306afe43a8988610de33a780809cc447 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 29 Mar 2023 10:58:05 +0200 Subject: [PATCH 25/29] Add test --- meilisearch/tests/search/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meilisearch/tests/search/mod.rs b/meilisearch/tests/search/mod.rs index 1e5c23a71..045cfde2c 100644 --- a/meilisearch/tests/search/mod.rs +++ b/meilisearch/tests/search/mod.rs @@ -30,7 +30,7 @@ pub(self) static DOCUMENTS: Lazy = Lazy::new(|| { "id": "166428", }, { - "title": "Glass", + "title": "Gläss", "id": "450465", } ]) @@ -52,7 +52,7 @@ pub(self) static NESTED_DOCUMENTS: Lazy = Lazy::new(|| { "age": 4, }, ], - "cattos": "pesti", + "cattos": "pésti", }, { "id": 654, @@ -142,7 +142,7 @@ async fn simple_search() { index.wait_task(1).await; index - .search(json!({"q": "pesti"}), |response, code| { + .search(json!({"q": "pésti"}), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!(response["hits"].as_array().unwrap().len(), 2); }) @@ -250,7 +250,7 @@ async fn search_multiple_params() { index .search( json!({ - "q": "pesti", + "q": "pésti", "attributesToCrop": ["catto:2"], "attributesToHighlight": ["catto"], "limit": 2, @@ -281,7 +281,7 @@ async fn search_with_filter_string_notation() { index .search( json!({ - "filter": "title = Glass" + "filter": "title = Gläss" }), |response, code| { assert_eq!(code, 200, "{}", response); @@ -305,7 +305,7 @@ async fn search_with_filter_string_notation() { index .search( json!({ - "filter": "cattos = pesti" + "filter": "cattos = pésti" }), |response, code| { assert_eq!(code, 200, "{}", response); @@ -343,7 +343,7 @@ async fn search_with_filter_array_notation() { let (response, code) = index .search_post(json!({ - "filter": ["title = Glass"] + "filter": ["title = Gläss"] })) .await; assert_eq!(code, 200, "{}", response); @@ -351,7 +351,7 @@ async fn search_with_filter_array_notation() { let (response, code) = index .search_post(json!({ - "filter": [["title = Glass", "title = \"Shazam!\"", "title = \"Escape Room\""]] + "filter": [["title = Gläss", "title = \"Shazam!\"", "title = \"Escape Room\""]] })) .await; assert_eq!(code, 200, "{}", response); From efea1e5837571e7af4822b12b2a25af2530f0178 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 29 Mar 2023 10:57:02 +0200 Subject: [PATCH 26/29] Fix facet normalization --- milli/src/lib.rs | 5 +++++ milli/src/search/facet/filter.rs | 2 +- .../extract/extract_fid_docid_facet_values.rs | 5 +---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/milli/src/lib.rs b/milli/src/lib.rs index 865195df5..e49e49d9c 100644 --- a/milli/src/lib.rs +++ b/milli/src/lib.rs @@ -22,6 +22,7 @@ use std::collections::{BTreeMap, HashMap}; use std::convert::{TryFrom, TryInto}; use std::hash::BuildHasherDefault; +use charabia::normalizer::{CharNormalizer, CompatibilityDecompositionNormalizer}; pub use filter_parser::{Condition, FilterCondition, Span, Token}; use fxhash::{FxHasher32, FxHasher64}; pub use grenad::CompressionType; @@ -252,6 +253,10 @@ pub fn is_faceted_by(field: &str, facet: &str) -> bool { && field[facet.len()..].chars().next().map(|c| c == '.').unwrap_or(true) } +pub fn normalize_facet(original: &str) -> String { + CompatibilityDecompositionNormalizer.normalize_str(original.trim()).to_lowercase() +} + #[cfg(test)] mod tests { use serde_json::json; diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index f67219494..c24abe6a5 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -230,7 +230,7 @@ impl<'a> Filter<'a> { &FacetGroupKey { field_id, level: 0, - left_bound: &val.value().to_lowercase(), + left_bound: &crate::normalize_facet(val.value()), }, )? .map(|v| v.bitmap) diff --git a/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs b/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs index 71ac330e2..f0bd78792 100644 --- a/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs +++ b/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs @@ -4,7 +4,6 @@ use std::fs::File; use std::io; use std::mem::size_of; -use charabia::normalizer::{CharNormalizer, CompatibilityDecompositionNormalizer}; use heed::zerocopy::AsBytes; use heed::BytesEncode; use roaring::RoaringBitmap; @@ -136,9 +135,7 @@ fn extract_facet_values(value: &Value) -> (Vec, Vec<(String, String)>) { } } Value::String(original) => { - let normalized = CompatibilityDecompositionNormalizer - .normalize_str(original.trim()) - .to_lowercase(); + let normalized = crate::normalize_facet(original); output_strings.push((normalized, original.clone())); } Value::Array(values) => { From 6592746337fd8be9ad2540d3c7c60cc75fe3d2a3 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 29 Mar 2023 14:36:17 +0200 Subject: [PATCH 27/29] Fix other unrelated tests --- meilisearch/tests/search/formatted.rs | 38 +++++++++++++-------------- meilisearch/tests/search/multi.rs | 18 ++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/meilisearch/tests/search/formatted.rs b/meilisearch/tests/search/formatted.rs index 076c14fe0..8a40616a3 100644 --- a/meilisearch/tests/search/formatted.rs +++ b/meilisearch/tests/search/formatted.rs @@ -14,7 +14,7 @@ async fn formatted_contain_wildcard() { index.add_documents(documents, None).await; index.wait_task(1).await; - index.search(json!({ "q": "pesti", "attributesToRetrieve": ["father", "mother"], "attributesToHighlight": ["father", "mother", "*"], "attributesToCrop": ["doggos"], "showMatchesPosition": true }), + index.search(json!({ "q": "pésti", "attributesToRetrieve": ["father", "mother"], "attributesToHighlight": ["father", "mother", "*"], "attributesToCrop": ["doggos"], "showMatchesPosition": true }), |response, code| { assert_eq!(code, 200, "{}", response); @@ -23,7 +23,7 @@ async fn formatted_contain_wildcard() { json!({ "_formatted": { "id": "852", - "cattos": "pesti", + "cattos": "pésti", }, "_matchesPosition": {"cattos": [{"start": 0, "length": 5}]}, }) @@ -33,13 +33,13 @@ async fn formatted_contain_wildcard() { .await; index - .search(json!({ "q": "pesti", "attributesToRetrieve": ["*"] }), |response, code| { + .search(json!({ "q": "pésti", "attributesToRetrieve": ["*"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( response["hits"][0], json!({ "id": 852, - "cattos": "pesti", + "cattos": "pésti", }) ); }) @@ -47,17 +47,17 @@ async fn formatted_contain_wildcard() { index .search( - json!({ "q": "pesti", "attributesToRetrieve": ["*"], "attributesToHighlight": ["id"], "showMatchesPosition": true }), + json!({ "q": "pésti", "attributesToRetrieve": ["*"], "attributesToHighlight": ["id"], "showMatchesPosition": true }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( response["hits"][0], json!({ "id": 852, - "cattos": "pesti", + "cattos": "pésti", "_formatted": { "id": "852", - "cattos": "pesti", + "cattos": "pésti", }, "_matchesPosition": {"cattos": [{"start": 0, "length": 5}]}, }) @@ -68,17 +68,17 @@ async fn formatted_contain_wildcard() { index .search( - json!({ "q": "pesti", "attributesToRetrieve": ["*"], "attributesToCrop": ["*"] }), + json!({ "q": "pésti", "attributesToRetrieve": ["*"], "attributesToCrop": ["*"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( response["hits"][0], json!({ "id": 852, - "cattos": "pesti", + "cattos": "pésti", "_formatted": { "id": "852", - "cattos": "pesti", + "cattos": "pésti", } }) ); @@ -87,16 +87,16 @@ async fn formatted_contain_wildcard() { .await; index - .search(json!({ "q": "pesti", "attributesToCrop": ["*"] }), |response, code| { + .search(json!({ "q": "pésti", "attributesToCrop": ["*"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( response["hits"][0], json!({ "id": 852, - "cattos": "pesti", + "cattos": "pésti", "_formatted": { "id": "852", - "cattos": "pesti", + "cattos": "pésti", } }) ); @@ -114,7 +114,7 @@ async fn format_nested() { index.wait_task(0).await; index - .search(json!({ "q": "pesti", "attributesToRetrieve": ["doggos"] }), |response, code| { + .search(json!({ "q": "pésti", "attributesToRetrieve": ["doggos"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( response["hits"][0], @@ -136,7 +136,7 @@ async fn format_nested() { index .search( - json!({ "q": "pesti", "attributesToRetrieve": ["doggos.name"] }), + json!({ "q": "pésti", "attributesToRetrieve": ["doggos.name"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( @@ -180,7 +180,7 @@ async fn format_nested() { .await; index - .search(json!({ "q": "pesti", "attributesToRetrieve": [], "attributesToHighlight": ["doggos.name"] }), + .search(json!({ "q": "pésti", "attributesToRetrieve": [], "attributesToHighlight": ["doggos.name"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( @@ -202,7 +202,7 @@ async fn format_nested() { .await; index - .search(json!({ "q": "pesti", "attributesToRetrieve": [], "attributesToCrop": ["doggos.name"] }), + .search(json!({ "q": "pésti", "attributesToRetrieve": [], "attributesToCrop": ["doggos.name"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( @@ -224,7 +224,7 @@ async fn format_nested() { .await; index - .search(json!({ "q": "pesti", "attributesToRetrieve": ["doggos.name"], "attributesToHighlight": ["doggos.age"] }), + .search(json!({ "q": "pésti", "attributesToRetrieve": ["doggos.name"], "attributesToHighlight": ["doggos.age"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( @@ -256,7 +256,7 @@ async fn format_nested() { .await; index - .search(json!({ "q": "pesti", "attributesToRetrieve": [], "attributesToHighlight": ["doggos.age"], "attributesToCrop": ["doggos.name"] }), + .search(json!({ "q": "pésti", "attributesToRetrieve": [], "attributesToHighlight": ["doggos.age"], "attributesToCrop": ["doggos.name"] }), |response, code| { assert_eq!(code, 200, "{}", response); assert_eq!( diff --git a/meilisearch/tests/search/multi.rs b/meilisearch/tests/search/multi.rs index 01751ff62..b00ddf3de 100644 --- a/meilisearch/tests/search/multi.rs +++ b/meilisearch/tests/search/multi.rs @@ -71,7 +71,7 @@ async fn simple_search_single_index() { "indexUid": "test", "hits": [ { - "title": "Glass", + "title": "Gläss", "id": "450465" } ], @@ -166,7 +166,7 @@ async fn simple_search_two_indexes() { let (response, code) = server .multi_search(json!({"queries": [ {"indexUid" : "test", "q": "glass"}, - {"indexUid": "nested", "q": "pesti"}, + {"indexUid": "nested", "q": "pésti"}, ]})) .await; snapshot!(code, @"200 OK"); @@ -176,7 +176,7 @@ async fn simple_search_two_indexes() { "indexUid": "test", "hits": [ { - "title": "Glass", + "title": "Gläss", "id": "450465" } ], @@ -203,7 +203,7 @@ async fn simple_search_two_indexes() { "age": 4 } ], - "cattos": "pesti" + "cattos": "pésti" }, { "id": 654, @@ -221,7 +221,7 @@ async fn simple_search_two_indexes() { ] } ], - "query": "pesti", + "query": "pésti", "processingTimeMs": "[time]", "limit": 20, "offset": 0, @@ -243,7 +243,7 @@ async fn search_one_index_doesnt_exist() { let (response, code) = server .multi_search(json!({"queries": [ {"indexUid" : "test", "q": "glass"}, - {"indexUid": "nested", "q": "pesti"}, + {"indexUid": "nested", "q": "pésti"}, ]})) .await; snapshot!(code, @"400 Bad Request"); @@ -264,7 +264,7 @@ async fn search_multiple_indexes_dont_exist() { let (response, code) = server .multi_search(json!({"queries": [ {"indexUid" : "test", "q": "glass"}, - {"indexUid": "nested", "q": "pesti"}, + {"indexUid": "nested", "q": "pésti"}, ]})) .await; snapshot!(code, @"400 Bad Request"); @@ -296,7 +296,7 @@ async fn search_one_query_error() { let (response, code) = server .multi_search(json!({"queries": [ {"indexUid" : "test", "q": "glass", "facets": ["title"]}, - {"indexUid": "nested", "q": "pesti"}, + {"indexUid": "nested", "q": "pésti"}, ]})) .await; snapshot!(code, @"400 Bad Request"); @@ -328,7 +328,7 @@ async fn search_multiple_query_errors() { let (response, code) = server .multi_search(json!({"queries": [ {"indexUid" : "test", "q": "glass", "facets": ["title"]}, - {"indexUid": "nested", "q": "pesti", "facets": ["doggos"]}, + {"indexUid": "nested", "q": "pésti", "facets": ["doggos"]}, ]})) .await; snapshot!(code, @"400 Bad Request"); From e7153e0a97b7db75b50b0d1ef599fba815f1afad Mon Sep 17 00:00:00 2001 From: Charlotte Vermandel Date: Wed, 29 Mar 2023 14:49:39 +0200 Subject: [PATCH 28/29] Update mini-dashboard to version V0.2.7 --- meilisearch/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch/Cargo.toml b/meilisearch/Cargo.toml index 809975ec7..d4b772322 100644 --- a/meilisearch/Cargo.toml +++ b/meilisearch/Cargo.toml @@ -115,5 +115,5 @@ japanese = ["meilisearch-types/japanese"] thai = ["meilisearch-types/thai"] [package.metadata.mini-dashboard] -assets-url = "https://github.com/meilisearch/mini-dashboard/releases/download/v0.2.6/build.zip" -sha1 = "dce0aba16bceab5549edf9f01de89858800f7422" +assets-url = "https://github.com/meilisearch/mini-dashboard/releases/download/v0.2.7/build.zip" +sha1 = "28b45bf772c84f9a6e16bc1689b393bfce8da7d6" From 67fd3b08ef5993ded169e7062c767942abc81cfe Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 5 Apr 2023 18:35:43 +0200 Subject: [PATCH 29/29] wait until all tasks are processed before running our dump integration tests --- meilisearch/tests/dumps/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meilisearch/tests/dumps/mod.rs b/meilisearch/tests/dumps/mod.rs index 1deb2de2a..31fa49b60 100644 --- a/meilisearch/tests/dumps/mod.rs +++ b/meilisearch/tests/dumps/mod.rs @@ -1121,6 +1121,12 @@ async fn import_dump_v5() { assert_eq!(indexes["results"][1]["uid"], json!("test2")); assert_eq!(indexes["results"][0]["primaryKey"], json!("id")); + // before doing anything we're going to wait until all the tasks in the dump have finished processing + let result = server.tasks_filter("statuses=enqueued,processing").await.0; + for task in result["results"].as_array().unwrap() { + server.wait_task(task["uid"].as_u64().unwrap()).await; + } + let expected_stats = json!({ "numberOfDocuments": 10, "isIndexing": false,