Skip to content

Commit 7c78721

Browse files
prattscurquiza
authored andcommitted
Adds usedDatabaseSize to stats, document and embeddings database metrics to index stats
1 parent 23bbff5 commit 7c78721

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,22 @@ 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, boolean isIndexing, Map<String, Integer> fieldDistribution,
26+
long rawDocumentDbSize, long avgDocumentSize, long numberOfEmbeddedDocuments, long numberOfEmbeddings) {
2227
this.numberOfDocuments = numberOfDocuments;
2328
this.isIndexing = isIndexing;
2429
this.fieldDistribution = fieldDistribution;
30+
this.rawDocumentDbSize = rawDocumentDbSize;
31+
this.avgDocumentSize = avgDocumentSize;
32+
this.numberOfEmbeddedDocuments = numberOfEmbeddedDocuments;
33+
this.numberOfEmbeddings = numberOfEmbeddings;
2534
}
2635
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ 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(long databaseSize, Date lastUpdate, Map<String, IndexStats> indexes,
20+
long usedDatabaseSize) {
1921
this.databaseSize = databaseSize;
2022
this.lastUpdate = lastUpdate;
2123
this.indexes = indexes;
24+
this.usedDatabaseSize = usedDatabaseSize;
2225
}
2326

2427
public Stats() {}

0 commit comments

Comments
 (0)