11package com .meilisearch .sdk .model ;
22
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
34import java .util .Map ;
45import lombok .Getter ;
6+ import lombok .Setter ;
57
68/**
79 * Stats data structure of a Meilisearch Index
1012 * specification</a>
1113 */
1214@ Getter
15+ @ Setter
1316public class IndexStats {
17+ @ JsonProperty ("numberOfDocuments" )
1418 protected long numberOfDocuments ;
19+
20+ @ JsonProperty ("isIndexing" )
1521 protected boolean isIndexing ;
22+
23+ @ JsonProperty ("fieldDistribution" )
1624 protected Map <String , Integer > fieldDistribution ;
25+
26+ @ JsonProperty ("rawDocumentDbSize" )
1727 protected long rawDocumentDbSize ;
28+
29+ @ JsonProperty ("avgDocumentSize" )
1830 protected long avgDocumentSize ;
31+
32+ @ JsonProperty ("numberOfEmbeddedDocuments" )
1933 protected long numberOfEmbeddedDocuments ;
34+
35+ @ JsonProperty ("numberOfEmbeddings" )
2036 protected long numberOfEmbeddings ;
2137
38+ @ JsonProperty ("indexSize" )
39+ protected long indexSize ;
40+
41+ @ JsonProperty ("usedIndexSize" )
42+ protected long usedIndexSize ;
43+
2244 public IndexStats () {}
2345
2446 public IndexStats (
@@ -29,12 +51,36 @@ public IndexStats(
2951 long avgDocumentSize ,
3052 long numberOfEmbeddedDocuments ,
3153 long numberOfEmbeddings ) {
54+ this (
55+ numberOfDocuments ,
56+ isIndexing ,
57+ fieldDistribution ,
58+ rawDocumentDbSize ,
59+ avgDocumentSize ,
60+ numberOfEmbeddedDocuments ,
61+ numberOfEmbeddings ,
62+ 0L ,
63+ 0L );
64+ }
65+
66+ public IndexStats (
67+ long numberOfDocuments ,
68+ boolean isIndexing ,
69+ Map <String , Integer > fieldDistribution ,
70+ long rawDocumentDbSize ,
71+ long avgDocumentSize ,
72+ long numberOfEmbeddedDocuments ,
73+ long numberOfEmbeddings ,
74+ long indexSize ,
75+ long usedIndexSize ) {
3276 this .numberOfDocuments = numberOfDocuments ;
3377 this .isIndexing = isIndexing ;
3478 this .fieldDistribution = fieldDistribution ;
3579 this .rawDocumentDbSize = rawDocumentDbSize ;
3680 this .avgDocumentSize = avgDocumentSize ;
3781 this .numberOfEmbeddedDocuments = numberOfEmbeddedDocuments ;
3882 this .numberOfEmbeddings = numberOfEmbeddings ;
83+ this .indexSize = indexSize ;
84+ this .usedIndexSize = usedIndexSize ;
3985 }
4086}
0 commit comments