Skip to content

Commit f006930

Browse files
meili-bors[bot]consoleLogItflevi29
authored
Merge #1888
1888: Add embedding metrics r=flevi29 a=consoleLogIt # Pull Request ## Related issue Fixes #1874 ## What does this PR do? adds the embedding metrics to the indexStats type - [x] Modify the stats API to include indexes.INDEXNAME.numberOfEmbeddedDocuments in SDK responses - [x] Modify the stats API to include indexes.INDEXNAME.numberOfEmbeddings in SDK responses ## 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: consoleLogIt <[email protected]> Co-authored-by: F. Levi <[email protected]>
2 parents 18ff4ee + e4586d7 commit f006930

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ export type IndexStats = {
783783
numberOfDocuments: number;
784784
isIndexing: boolean;
785785
fieldDistribution: FieldDistribution;
786+
numberOfEmbeddedDocuments: number;
787+
numberOfEmbeddings: number;
786788
};
787789

788790
export type Stats = {

tests/index.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
365365
expect(response).toHaveProperty("numberOfDocuments", 0);
366366
expect(response).toHaveProperty("isIndexing", false);
367367
expect(response).toHaveProperty("fieldDistribution", {});
368+
expect(response).toHaveProperty("numberOfEmbeddedDocuments", 0);
369+
expect(response).toHaveProperty("numberOfEmbeddings", 0);
368370
});
369371

370372
test(`${permission} key: Get updatedAt and createdAt through fetch info`, async () => {

0 commit comments

Comments
 (0)