Skip to content

Commit c0fa93f

Browse files
committed
Change field order and update documentation
1 parent 3655619 commit c0fa93f

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

src/client.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,10 +1118,17 @@ impl<Http: HttpClient> Client<Http> {
11181118
#[derive(Debug, Clone, Deserialize)]
11191119
#[serde(rename_all = "camelCase")]
11201120
pub struct ClientStats {
1121+
/// Storage space claimed by Meilisearch and LMDB in bytes
11211122
pub database_size: usize,
1123+
1124+
/// Storage space used by the database in bytes, excluding unused space claimed by LMDB
11221125
pub used_database_size: usize,
1126+
1127+
/// When the last update was made to the database in the `RFC 3339` format
11231128
#[serde(with = "time::serde::rfc3339::option")]
11241129
pub last_update: Option<OffsetDateTime>,
1130+
1131+
/// The statistics for each index found in the database
11251132
pub indexes: HashMap<String, IndexStats>,
11261133
}
11271134

src/indexes.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,18 +1849,24 @@ impl<'a, Http: HttpClient> AsRef<IndexUpdater<'a, Http>> for IndexUpdater<'a, Ht
18491849
pub struct IndexStats {
18501850
/// Total number of documents in an index
18511851
pub number_of_documents: usize,
1852-
/// If `true`, the index is still processing documents and attempts to search will result in undefined behavior
1853-
pub is_indexing: bool,
1854-
/// Shows every field in the index along with the total number of documents containing that field in said index
1855-
pub field_distribution: HashMap<String, usize>,
1856-
/// Storage space claimed by all documents in the index in bytes
1857-
pub raw_document_db_size: usize,
1858-
/// Total size of the documents stored in an index divided by the number of documents in that same index
1859-
pub avg_document_size: usize,
1852+
18601853
/// Total number of documents with at least one embedding
18611854
pub number_of_embedded_documents: usize,
1855+
18621856
/// Total number of embeddings in an index
18631857
pub number_of_embeddings: usize,
1858+
1859+
/// Storage space claimed by all documents in the index in bytes
1860+
pub raw_document_db_size: usize,
1861+
1862+
/// Total size of the documents stored in an index divided by the number of documents in that same index
1863+
pub avg_document_size: usize,
1864+
1865+
/// If `true`, the index is still processing documents and attempts to search will yield impredictable results
1866+
pub is_indexing: bool,
1867+
1868+
/// Shows every field in the index along with the total number of documents containing that field in said index
1869+
pub field_distribution: HashMap<String, usize>,
18641870
}
18651871

18661872
/// An [`IndexesQuery`] containing filter and pagination parameters when searching for [Indexes](Index).

0 commit comments

Comments
 (0)