@mastra/chroma 0.2.15-alpha.2 → 0.2.15-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
1
 
2
- > @mastra/chroma@0.2.15-alpha.2 build /home/runner/work/mastra/mastra/stores/chroma
2
+ > @mastra/chroma@0.2.15-alpha.3 build /home/runner/work/mastra/mastra/stores/chroma
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.4.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 9514ms
9
+ TSC ⚡️ Build success in 9802ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/stores/chroma/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/stores/chroma/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 8745ms
16
+ DTS ⚡️ Build success in 9633ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- ESM dist/index.js 11.12 KB
21
- ESM ⚡️ Build success in 765ms
22
- CJS dist/index.cjs 11.18 KB
23
- CJS ⚡️ Build success in 769ms
20
+ ESM dist/index.js 13.93 KB
21
+ ESM ⚡️ Build success in 630ms
22
+ CJS dist/index.cjs 13.98 KB
23
+ CJS ⚡️ Build success in 636ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @mastra/chroma
2
2
 
3
+ ## 0.2.15-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
8
+ - Updated dependencies [396be50]
9
+ - Updated dependencies [c3bd795]
10
+ - Updated dependencies [da082f8]
11
+ - Updated dependencies [a5810ce]
12
+ - @mastra/core@0.9.4-alpha.3
13
+
3
14
  ## 0.2.15-alpha.2
4
15
 
5
16
  ### Patch Changes
@@ -63,11 +63,54 @@ declare class ChromaVector extends MastraVector {
63
63
  listIndexes(): Promise<string[]>;
64
64
  describeIndex(indexName: string): Promise<IndexStats>;
65
65
  deleteIndex(indexName: string): Promise<void>;
66
+ /**
67
+ * @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
68
+ *
69
+ * Updates a vector by its ID with the provided vector and/or metadata.
70
+ * @param indexName - The name of the index containing the vector.
71
+ * @param id - The ID of the vector to update.
72
+ * @param update - An object containing the vector and/or metadata to update.
73
+ * @param update.vector - An optional array of numbers representing the new vector.
74
+ * @param update.metadata - An optional record containing the new metadata.
75
+ * @returns A promise that resolves when the update is complete.
76
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
77
+ */
66
78
  updateIndexById(indexName: string, id: string, update: {
67
79
  vector?: number[];
68
80
  metadata?: Record<string, any>;
69
81
  }): Promise<void>;
82
+ /**
83
+ * Updates a vector by its ID with the provided vector and/or metadata.
84
+ * @param indexName - The name of the index containing the vector.
85
+ * @param id - The ID of the vector to update.
86
+ * @param update - An object containing the vector and/or metadata to update.
87
+ * @param update.vector - An optional array of numbers representing the new vector.
88
+ * @param update.metadata - An optional record containing the new metadata.
89
+ * @returns A promise that resolves when the update is complete.
90
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
91
+ */
92
+ updateVector(indexName: string, id: string, update: {
93
+ vector?: number[];
94
+ metadata?: Record<string, any>;
95
+ }): Promise<void>;
96
+ /**
97
+ * @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
98
+ *
99
+ * Deletes a vector by its ID.
100
+ * @param indexName - The name of the index containing the vector.
101
+ * @param id - The ID of the vector to delete.
102
+ * @returns A promise that resolves when the deletion is complete.
103
+ * @throws Will throw an error if the deletion operation fails.
104
+ */
70
105
  deleteIndexById(indexName: string, id: string): Promise<void>;
106
+ /**
107
+ * Deletes a vector by its ID.
108
+ * @param indexName - The name of the index containing the vector.
109
+ * @param id - The ID of the vector to delete.
110
+ * @returns A promise that resolves when the deletion is complete.
111
+ * @throws Will throw an error if the deletion operation fails.
112
+ */
113
+ deleteVector(indexName: string, id: string): Promise<void>;
71
114
  }
72
115
  export { ChromaVector }
73
116
  export { ChromaVector as ChromaVector_alias_1 }
@@ -63,11 +63,54 @@ declare class ChromaVector extends MastraVector {
63
63
  listIndexes(): Promise<string[]>;
64
64
  describeIndex(indexName: string): Promise<IndexStats>;
65
65
  deleteIndex(indexName: string): Promise<void>;
66
+ /**
67
+ * @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
68
+ *
69
+ * Updates a vector by its ID with the provided vector and/or metadata.
70
+ * @param indexName - The name of the index containing the vector.
71
+ * @param id - The ID of the vector to update.
72
+ * @param update - An object containing the vector and/or metadata to update.
73
+ * @param update.vector - An optional array of numbers representing the new vector.
74
+ * @param update.metadata - An optional record containing the new metadata.
75
+ * @returns A promise that resolves when the update is complete.
76
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
77
+ */
66
78
  updateIndexById(indexName: string, id: string, update: {
67
79
  vector?: number[];
68
80
  metadata?: Record<string, any>;
69
81
  }): Promise<void>;
82
+ /**
83
+ * Updates a vector by its ID with the provided vector and/or metadata.
84
+ * @param indexName - The name of the index containing the vector.
85
+ * @param id - The ID of the vector to update.
86
+ * @param update - An object containing the vector and/or metadata to update.
87
+ * @param update.vector - An optional array of numbers representing the new vector.
88
+ * @param update.metadata - An optional record containing the new metadata.
89
+ * @returns A promise that resolves when the update is complete.
90
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
91
+ */
92
+ updateVector(indexName: string, id: string, update: {
93
+ vector?: number[];
94
+ metadata?: Record<string, any>;
95
+ }): Promise<void>;
96
+ /**
97
+ * @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
98
+ *
99
+ * Deletes a vector by its ID.
100
+ * @param indexName - The name of the index containing the vector.
101
+ * @param id - The ID of the vector to delete.
102
+ * @returns A promise that resolves when the deletion is complete.
103
+ * @throws Will throw an error if the deletion operation fails.
104
+ */
70
105
  deleteIndexById(indexName: string, id: string): Promise<void>;
106
+ /**
107
+ * Deletes a vector by its ID.
108
+ * @param indexName - The name of the index containing the vector.
109
+ * @param id - The ID of the vector to delete.
110
+ * @returns A promise that resolves when the deletion is complete.
111
+ * @throws Will throw an error if the deletion operation fails.
112
+ */
113
+ deleteVector(indexName: string, id: string): Promise<void>;
71
114
  }
72
115
  export { ChromaVector }
73
116
  export { ChromaVector as ChromaVector_alias_1 }
package/dist/index.cjs CHANGED
@@ -218,26 +218,84 @@ var ChromaVector = class extends vector.MastraVector {
218
218
  await this.client.deleteCollection({ name: indexName });
219
219
  this.collections.delete(indexName);
220
220
  }
221
+ /**
222
+ * @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
223
+ *
224
+ * Updates a vector by its ID with the provided vector and/or metadata.
225
+ * @param indexName - The name of the index containing the vector.
226
+ * @param id - The ID of the vector to update.
227
+ * @param update - An object containing the vector and/or metadata to update.
228
+ * @param update.vector - An optional array of numbers representing the new vector.
229
+ * @param update.metadata - An optional record containing the new metadata.
230
+ * @returns A promise that resolves when the update is complete.
231
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
232
+ */
221
233
  async updateIndexById(indexName, id, update) {
222
- if (!update.vector && !update.metadata) {
223
- throw new Error("No updates provided");
224
- }
225
- const collection = await this.getCollection(indexName, true);
226
- const updateOptions = { ids: [id] };
227
- if (update?.vector) {
228
- updateOptions.embeddings = [update.vector];
229
- }
230
- if (update?.metadata) {
231
- updateOptions.metadatas = [update.metadata];
234
+ this.logger.warn(
235
+ `Deprecation Warning: updateIndexById() is deprecated.
236
+ Please use updateVector() instead.
237
+ updateIndexById() will be removed on May 20th, 2025.`
238
+ );
239
+ await this.updateVector(indexName, id, update);
240
+ }
241
+ /**
242
+ * Updates a vector by its ID with the provided vector and/or metadata.
243
+ * @param indexName - The name of the index containing the vector.
244
+ * @param id - The ID of the vector to update.
245
+ * @param update - An object containing the vector and/or metadata to update.
246
+ * @param update.vector - An optional array of numbers representing the new vector.
247
+ * @param update.metadata - An optional record containing the new metadata.
248
+ * @returns A promise that resolves when the update is complete.
249
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
250
+ */
251
+ async updateVector(indexName, id, update) {
252
+ try {
253
+ if (!update.vector && !update.metadata) {
254
+ throw new Error("No updates provided");
255
+ }
256
+ const collection = await this.getCollection(indexName, true);
257
+ const updateOptions = { ids: [id] };
258
+ if (update?.vector) {
259
+ const stats = await this.describeIndex(indexName);
260
+ this.validateVectorDimensions([update.vector], stats.dimension);
261
+ updateOptions.embeddings = [update.vector];
262
+ }
263
+ if (update?.metadata) {
264
+ updateOptions.metadatas = [update.metadata];
265
+ }
266
+ return await collection.update(updateOptions);
267
+ } catch (error) {
268
+ throw new Error(`Failed to update vector by id: ${id} for index name: ${indexName}: ${error.message}`);
232
269
  }
233
- return await collection.update(updateOptions);
234
270
  }
271
+ /**
272
+ * @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
273
+ *
274
+ * Deletes a vector by its ID.
275
+ * @param indexName - The name of the index containing the vector.
276
+ * @param id - The ID of the vector to delete.
277
+ * @returns A promise that resolves when the deletion is complete.
278
+ * @throws Will throw an error if the deletion operation fails.
279
+ */
235
280
  async deleteIndexById(indexName, id) {
281
+ this.logger.warn(
282
+ `Deprecation Warning: deleteIndexById() is deprecated. Please use deleteVector() instead. deleteIndexById() will be removed on May 20th.`
283
+ );
284
+ await this.deleteVector(indexName, id);
285
+ }
286
+ /**
287
+ * Deletes a vector by its ID.
288
+ * @param indexName - The name of the index containing the vector.
289
+ * @param id - The ID of the vector to delete.
290
+ * @returns A promise that resolves when the deletion is complete.
291
+ * @throws Will throw an error if the deletion operation fails.
292
+ */
293
+ async deleteVector(indexName, id) {
236
294
  try {
237
295
  const collection = await this.getCollection(indexName, true);
238
296
  await collection.delete({ ids: [id] });
239
297
  } catch (error) {
240
- throw new Error(`Failed to delete index by id: ${id} for index name: ${indexName}: ${error.message}`);
298
+ throw new Error(`Failed to delete vector by id: ${id} for index name: ${indexName}: ${error.message}`);
241
299
  }
242
300
  }
243
301
  };
package/dist/index.js CHANGED
@@ -216,26 +216,84 @@ var ChromaVector = class extends MastraVector {
216
216
  await this.client.deleteCollection({ name: indexName });
217
217
  this.collections.delete(indexName);
218
218
  }
219
+ /**
220
+ * @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
221
+ *
222
+ * Updates a vector by its ID with the provided vector and/or metadata.
223
+ * @param indexName - The name of the index containing the vector.
224
+ * @param id - The ID of the vector to update.
225
+ * @param update - An object containing the vector and/or metadata to update.
226
+ * @param update.vector - An optional array of numbers representing the new vector.
227
+ * @param update.metadata - An optional record containing the new metadata.
228
+ * @returns A promise that resolves when the update is complete.
229
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
230
+ */
219
231
  async updateIndexById(indexName, id, update) {
220
- if (!update.vector && !update.metadata) {
221
- throw new Error("No updates provided");
222
- }
223
- const collection = await this.getCollection(indexName, true);
224
- const updateOptions = { ids: [id] };
225
- if (update?.vector) {
226
- updateOptions.embeddings = [update.vector];
227
- }
228
- if (update?.metadata) {
229
- updateOptions.metadatas = [update.metadata];
232
+ this.logger.warn(
233
+ `Deprecation Warning: updateIndexById() is deprecated.
234
+ Please use updateVector() instead.
235
+ updateIndexById() will be removed on May 20th, 2025.`
236
+ );
237
+ await this.updateVector(indexName, id, update);
238
+ }
239
+ /**
240
+ * Updates a vector by its ID with the provided vector and/or metadata.
241
+ * @param indexName - The name of the index containing the vector.
242
+ * @param id - The ID of the vector to update.
243
+ * @param update - An object containing the vector and/or metadata to update.
244
+ * @param update.vector - An optional array of numbers representing the new vector.
245
+ * @param update.metadata - An optional record containing the new metadata.
246
+ * @returns A promise that resolves when the update is complete.
247
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
248
+ */
249
+ async updateVector(indexName, id, update) {
250
+ try {
251
+ if (!update.vector && !update.metadata) {
252
+ throw new Error("No updates provided");
253
+ }
254
+ const collection = await this.getCollection(indexName, true);
255
+ const updateOptions = { ids: [id] };
256
+ if (update?.vector) {
257
+ const stats = await this.describeIndex(indexName);
258
+ this.validateVectorDimensions([update.vector], stats.dimension);
259
+ updateOptions.embeddings = [update.vector];
260
+ }
261
+ if (update?.metadata) {
262
+ updateOptions.metadatas = [update.metadata];
263
+ }
264
+ return await collection.update(updateOptions);
265
+ } catch (error) {
266
+ throw new Error(`Failed to update vector by id: ${id} for index name: ${indexName}: ${error.message}`);
230
267
  }
231
- return await collection.update(updateOptions);
232
268
  }
269
+ /**
270
+ * @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
271
+ *
272
+ * Deletes a vector by its ID.
273
+ * @param indexName - The name of the index containing the vector.
274
+ * @param id - The ID of the vector to delete.
275
+ * @returns A promise that resolves when the deletion is complete.
276
+ * @throws Will throw an error if the deletion operation fails.
277
+ */
233
278
  async deleteIndexById(indexName, id) {
279
+ this.logger.warn(
280
+ `Deprecation Warning: deleteIndexById() is deprecated. Please use deleteVector() instead. deleteIndexById() will be removed on May 20th.`
281
+ );
282
+ await this.deleteVector(indexName, id);
283
+ }
284
+ /**
285
+ * Deletes a vector by its ID.
286
+ * @param indexName - The name of the index containing the vector.
287
+ * @param id - The ID of the vector to delete.
288
+ * @returns A promise that resolves when the deletion is complete.
289
+ * @throws Will throw an error if the deletion operation fails.
290
+ */
291
+ async deleteVector(indexName, id) {
234
292
  try {
235
293
  const collection = await this.getCollection(indexName, true);
236
294
  await collection.delete({ ids: [id] });
237
295
  } catch (error) {
238
- throw new Error(`Failed to delete index by id: ${id} for index name: ${indexName}: ${error.message}`);
296
+ throw new Error(`Failed to delete vector by id: ${id} for index name: ${indexName}: ${error.message}`);
239
297
  }
240
298
  }
241
299
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/chroma",
3
- "version": "0.2.15-alpha.2",
3
+ "version": "0.2.15-alpha.3",
4
4
  "description": "Chroma vector store provider for Mastra",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "chromadb": "^2.2.0",
24
- "@mastra/core": "^0.9.4-alpha.2"
24
+ "@mastra/core": "^0.9.4-alpha.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@microsoft/api-extractor": "^7.52.5",
@@ -133,7 +133,7 @@ describe('ChromaVector Integration Tests', () => {
133
133
  metadata: newMetaData,
134
134
  };
135
135
 
136
- await vectorDB.updateIndexById(testIndexName, idToBeUpdated, update);
136
+ await vectorDB.updateVector(testIndexName, idToBeUpdated, update);
137
137
 
138
138
  const results: QueryResult[] = await vectorDB.query({
139
139
  indexName: testIndexName,
@@ -159,7 +159,7 @@ describe('ChromaVector Integration Tests', () => {
159
159
  metadata: newMetaData,
160
160
  };
161
161
 
162
- await vectorDB.updateIndexById(testIndexName, idToBeUpdated, update);
162
+ await vectorDB.updateVector(testIndexName, idToBeUpdated, update);
163
163
 
164
164
  const results: QueryResult[] = await vectorDB.query({
165
165
  indexName: testIndexName,
@@ -183,7 +183,7 @@ describe('ChromaVector Integration Tests', () => {
183
183
  vector: newVector,
184
184
  };
185
185
 
186
- await vectorDB.updateIndexById(testIndexName, idToBeUpdated, update);
186
+ await vectorDB.updateVector(testIndexName, idToBeUpdated, update);
187
187
 
188
188
  const results: QueryResult[] = await vectorDB.query({
189
189
  indexName: testIndexName,
@@ -196,7 +196,7 @@ describe('ChromaVector Integration Tests', () => {
196
196
  });
197
197
 
198
198
  it('should throw exception when no updates are given', async () => {
199
- await expect(vectorDB.updateIndexById(testIndexName, 'id', {})).rejects.toThrow('No updates provided');
199
+ await expect(vectorDB.updateVector(testIndexName, 'id', {})).rejects.toThrow('No updates provided');
200
200
  });
201
201
 
202
202
  it('should delete the vector by id', async () => {
@@ -204,7 +204,7 @@ describe('ChromaVector Integration Tests', () => {
204
204
  expect(ids).toHaveLength(3);
205
205
  const idToBeDeleted = ids[0];
206
206
 
207
- await vectorDB.deleteIndexById(testIndexName, idToBeDeleted);
207
+ await vectorDB.deleteVector(testIndexName, idToBeDeleted);
208
208
 
209
209
  const results: QueryResult[] = await vectorDB.query({
210
210
  indexName: testIndexName,
@@ -196,36 +196,100 @@ export class ChromaVector extends MastraVector {
196
196
  this.collections.delete(indexName);
197
197
  }
198
198
 
199
+ /**
200
+ * @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
201
+ *
202
+ * Updates a vector by its ID with the provided vector and/or metadata.
203
+ * @param indexName - The name of the index containing the vector.
204
+ * @param id - The ID of the vector to update.
205
+ * @param update - An object containing the vector and/or metadata to update.
206
+ * @param update.vector - An optional array of numbers representing the new vector.
207
+ * @param update.metadata - An optional record containing the new metadata.
208
+ * @returns A promise that resolves when the update is complete.
209
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
210
+ */
199
211
  async updateIndexById(
200
212
  indexName: string,
201
213
  id: string,
202
214
  update: { vector?: number[]; metadata?: Record<string, any> },
203
215
  ): Promise<void> {
204
- if (!update.vector && !update.metadata) {
205
- throw new Error('No updates provided');
206
- }
216
+ this.logger.warn(
217
+ `Deprecation Warning: updateIndexById() is deprecated.
218
+ Please use updateVector() instead.
219
+ updateIndexById() will be removed on May 20th, 2025.`,
220
+ );
221
+ await this.updateVector(indexName, id, update);
222
+ }
223
+
224
+ /**
225
+ * Updates a vector by its ID with the provided vector and/or metadata.
226
+ * @param indexName - The name of the index containing the vector.
227
+ * @param id - The ID of the vector to update.
228
+ * @param update - An object containing the vector and/or metadata to update.
229
+ * @param update.vector - An optional array of numbers representing the new vector.
230
+ * @param update.metadata - An optional record containing the new metadata.
231
+ * @returns A promise that resolves when the update is complete.
232
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
233
+ */
234
+ async updateVector(
235
+ indexName: string,
236
+ id: string,
237
+ update: { vector?: number[]; metadata?: Record<string, any> },
238
+ ): Promise<void> {
239
+ try {
240
+ if (!update.vector && !update.metadata) {
241
+ throw new Error('No updates provided');
242
+ }
207
243
 
208
- const collection: Collection = await this.getCollection(indexName, true);
244
+ const collection: Collection = await this.getCollection(indexName, true);
209
245
 
210
- const updateOptions: UpdateRecordsParams = { ids: [id] };
246
+ const updateOptions: UpdateRecordsParams = { ids: [id] };
211
247
 
212
- if (update?.vector) {
213
- updateOptions.embeddings = [update.vector];
214
- }
248
+ if (update?.vector) {
249
+ const stats = await this.describeIndex(indexName);
250
+ this.validateVectorDimensions([update.vector], stats.dimension);
251
+ updateOptions.embeddings = [update.vector];
252
+ }
215
253
 
216
- if (update?.metadata) {
217
- updateOptions.metadatas = [update.metadata];
218
- }
254
+ if (update?.metadata) {
255
+ updateOptions.metadatas = [update.metadata];
256
+ }
219
257
 
220
- return await collection.update(updateOptions);
258
+ return await collection.update(updateOptions);
259
+ } catch (error: any) {
260
+ throw new Error(`Failed to update vector by id: ${id} for index name: ${indexName}: ${error.message}`);
261
+ }
221
262
  }
222
263
 
264
+ /**
265
+ * @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
266
+ *
267
+ * Deletes a vector by its ID.
268
+ * @param indexName - The name of the index containing the vector.
269
+ * @param id - The ID of the vector to delete.
270
+ * @returns A promise that resolves when the deletion is complete.
271
+ * @throws Will throw an error if the deletion operation fails.
272
+ */
223
273
  async deleteIndexById(indexName: string, id: string): Promise<void> {
274
+ this.logger.warn(
275
+ `Deprecation Warning: deleteIndexById() is deprecated. Please use deleteVector() instead. deleteIndexById() will be removed on May 20th.`,
276
+ );
277
+ await this.deleteVector(indexName, id);
278
+ }
279
+
280
+ /**
281
+ * Deletes a vector by its ID.
282
+ * @param indexName - The name of the index containing the vector.
283
+ * @param id - The ID of the vector to delete.
284
+ * @returns A promise that resolves when the deletion is complete.
285
+ * @throws Will throw an error if the deletion operation fails.
286
+ */
287
+ async deleteVector(indexName: string, id: string): Promise<void> {
224
288
  try {
225
289
  const collection: Collection = await this.getCollection(indexName, true);
226
290
  await collection.delete({ ids: [id] });
227
291
  } catch (error: any) {
228
- throw new Error(`Failed to delete index by id: ${id} for index name: ${indexName}: ${error.message}`);
292
+ throw new Error(`Failed to delete vector by id: ${id} for index name: ${indexName}: ${error.message}`);
229
293
  }
230
294
  }
231
295
  }