Skip to content

Commit cfc07ea

Browse files
meili-bors[bot]prattsprateek-ec
authored
Merge #830
830: Add usedDatabaseSize to stats, document and embeddings database metrics to index stats r=curquiza a=pratts # Pull Request ## Related issue Fixes #819 #820 #821 ## What does this PR do? - Adds `usedDatabaseSize` to stats - Adds documents database metrics to stats - Adds embbedings database metrics to stats ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: Prateek Sharma <[email protected]> Co-authored-by: Prateek Sharma <[email protected]>
2 parents 23bbff5 + 370318a commit cfc07ea

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

src/main/java/com/meilisearch/sdk/model/IndexStats.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,27 @@ public class IndexStats {
1414
protected long numberOfDocuments;
1515
protected boolean isIndexing;
1616
protected Map<String, Integer> fieldDistribution;
17+
protected long rawDocumentDbSize;
18+
protected long avgDocumentSize;
19+
protected long numberOfEmbeddedDocuments;
20+
protected long numberOfEmbeddings;
1721

1822
public IndexStats() {}
1923

2024
public IndexStats(
21-
long numberOfDocuments, boolean isIndexing, Map<String, Integer> fieldDistribution) {
25+
long numberOfDocuments,
26+
boolean isIndexing,
27+
Map<String, Integer> fieldDistribution,
28+
long rawDocumentDbSize,
29+
long avgDocumentSize,
30+
long numberOfEmbeddedDocuments,
31+
long numberOfEmbeddings) {
2232
this.numberOfDocuments = numberOfDocuments;
2333
this.isIndexing = isIndexing;
2434
this.fieldDistribution = fieldDistribution;
35+
this.rawDocumentDbSize = rawDocumentDbSize;
36+
this.avgDocumentSize = avgDocumentSize;
37+
this.numberOfEmbeddedDocuments = numberOfEmbeddedDocuments;
38+
this.numberOfEmbeddings = numberOfEmbeddings;
2539
}
2640
}

src/main/java/com/meilisearch/sdk/model/Stats.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ public class Stats {
1414
protected long databaseSize;
1515
protected Date lastUpdate;
1616
protected Map<String, IndexStats> indexes;
17+
protected long usedDatabaseSize;
1718

18-
public Stats(long databaseSize, Date lastUpdate, Map<String, IndexStats> indexes) {
19+
public Stats(
20+
long databaseSize,
21+
Date lastUpdate,
22+
Map<String, IndexStats> indexes,
23+
long usedDatabaseSize) {
1924
this.databaseSize = databaseSize;
2025
this.lastUpdate = lastUpdate;
2126
this.indexes = indexes;
27+
this.usedDatabaseSize = usedDatabaseSize;
2228
}
2329

2430
public Stats() {}

0 commit comments

Comments
 (0)