Update milli version to v0.5.0

This commit is contained in:
Clémentine Urquizar 2021-06-21 16:59:27 +02:00 committed by Tamo
parent 25af262e79
commit 2e3d85c31a
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
6 changed files with 48 additions and 48 deletions

View file

@ -51,7 +51,7 @@ main_error = "0.1.0"
meilisearch-error = { path = "../meilisearch-error" }
meilisearch-tokenizer = { git = "https://github.com/meilisearch/Tokenizer.git", tag = "v0.2.2" }
memmap = "0.7.0"
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.4.1" }
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.5.0" }
mime = "0.3.16"
once_cell = "1.5.2"
oxidized-json-checker = "0.3.2"

View file

@ -340,7 +340,7 @@ impl<S: IndexStore + Sync + Send> IndexActor<S> {
size: index.size(),
number_of_documents: index.number_of_documents(&rtxn)?,
is_indexing: None,
fields_distribution: index.fields_distribution(&rtxn)?,
field_distribution: index.field_distribution(&rtxn)?,
})
})
.await?

View file

@ -7,7 +7,7 @@ use actix_web::web::{Bytes, Payload};
use chrono::{DateTime, Utc};
use futures::stream::StreamExt;
use log::info;
use milli::FieldsDistribution;
use milli::FieldDistribution;
use serde::{Deserialize, Serialize};
use tokio::sync::mpsc;
use tokio::time::sleep;
@ -63,7 +63,7 @@ pub struct IndexStats {
/// index returns it, since it is the `UpdateStore` that knows what index is currently indexing. It is
/// later set to either true or false, we we retrieve the information from the `UpdateStore`
pub is_indexing: Option<bool>,
pub fields_distribution: FieldsDistribution,
pub field_distribution: FieldDistribution,
}
#[derive(Clone)]

View file

@ -15,7 +15,7 @@ async fn stats() {
assert_eq!(code, 200);
assert_eq!(response["numberOfDocuments"], 0);
assert!(response["isIndexing"] == false);
assert!(response["fieldsDistribution"]
assert!(response["fieldDistribution"]
.as_object()
.unwrap()
.is_empty());
@ -42,7 +42,7 @@ async fn stats() {
assert_eq!(code, 200);
assert_eq!(response["numberOfDocuments"], 2);
assert!(response["isIndexing"] == false);
assert_eq!(response["fieldsDistribution"]["id"], 2);
assert_eq!(response["fieldsDistribution"]["name"], 1);
assert_eq!(response["fieldsDistribution"]["age"], 1);
assert_eq!(response["fieldDistribution"]["id"], 2);
assert_eq!(response["fieldDistribution"]["name"], 1);
assert_eq!(response["fieldDistribution"]["age"], 1);
}

View file

@ -67,7 +67,7 @@ async fn stats() {
assert!(response.get("lastUpdate").is_some());
assert_eq!(response["indexes"]["test"]["numberOfDocuments"], 2);
assert!(response["indexes"]["test"]["isIndexing"] == false);
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["id"], 2);
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["name"], 1);
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["age"], 1);
assert_eq!(response["indexes"]["test"]["fieldDistribution"]["id"], 2);
assert_eq!(response["indexes"]["test"]["fieldDistribution"]["name"], 1);
assert_eq!(response["indexes"]["test"]["fieldDistribution"]["age"], 1);
}