@mastra/lance 0.0.0-main-test-05-11-2025-2-20251106025330 → 0.0.0-main-test-2-20251127211532
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.
- package/CHANGELOG.md +246 -3
- package/dist/index.cjs +234 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +234 -56
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +1 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/vector/filter.d.ts +5 -5
- package/dist/vector/index.d.ts +3 -2
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +11 -9
package/dist/index.js
CHANGED
|
@@ -1266,6 +1266,8 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1266
1266
|
filteredScore[key] = JSON.stringify(filteredScore[key]);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
|
+
filteredScore.createdAt = /* @__PURE__ */ new Date();
|
|
1270
|
+
filteredScore.updatedAt = /* @__PURE__ */ new Date();
|
|
1269
1271
|
filteredScore.id = id;
|
|
1270
1272
|
await table.add([filteredScore], { mode: "append" });
|
|
1271
1273
|
return { score };
|
|
@@ -1288,8 +1290,7 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1288
1290
|
const query = table.query().where(`id = '${id}'`).limit(1);
|
|
1289
1291
|
const records = await query.toArray();
|
|
1290
1292
|
if (records.length === 0) return null;
|
|
1291
|
-
|
|
1292
|
-
return processResultWithTypeConversion(records[0], schema);
|
|
1293
|
+
return await this.transformScoreRow(records[0]);
|
|
1293
1294
|
} catch (error) {
|
|
1294
1295
|
throw new MastraError(
|
|
1295
1296
|
{
|
|
@@ -1303,6 +1304,16 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1303
1304
|
);
|
|
1304
1305
|
}
|
|
1305
1306
|
}
|
|
1307
|
+
async transformScoreRow(row) {
|
|
1308
|
+
const schema = await getTableSchema({ tableName: TABLE_SCORERS, client: this.client });
|
|
1309
|
+
const transformed = processResultWithTypeConversion(row, schema);
|
|
1310
|
+
const result = {
|
|
1311
|
+
...transformed,
|
|
1312
|
+
createdAt: row.createdAt,
|
|
1313
|
+
updatedAt: row.updatedAt
|
|
1314
|
+
};
|
|
1315
|
+
return result;
|
|
1316
|
+
}
|
|
1306
1317
|
async listScoresByScorerId({
|
|
1307
1318
|
scorerId,
|
|
1308
1319
|
pagination,
|
|
@@ -1343,8 +1354,7 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1343
1354
|
if (start > 0) query = query.offset(start);
|
|
1344
1355
|
}
|
|
1345
1356
|
const records = await query.toArray();
|
|
1346
|
-
const
|
|
1347
|
-
const scores = processResultWithTypeConversion(records, schema);
|
|
1357
|
+
const scores = await Promise.all(records.map(async (record) => await this.transformScoreRow(record)));
|
|
1348
1358
|
return {
|
|
1349
1359
|
pagination: {
|
|
1350
1360
|
page,
|
|
@@ -1385,8 +1395,7 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1385
1395
|
if (start > 0) query = query.offset(start);
|
|
1386
1396
|
}
|
|
1387
1397
|
const records = await query.toArray();
|
|
1388
|
-
const
|
|
1389
|
-
const scores = processResultWithTypeConversion(records, schema);
|
|
1398
|
+
const scores = await Promise.all(records.map(async (record) => await this.transformScoreRow(record)));
|
|
1390
1399
|
return {
|
|
1391
1400
|
pagination: {
|
|
1392
1401
|
page,
|
|
@@ -1428,8 +1437,7 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1428
1437
|
if (start > 0) query = query.offset(start);
|
|
1429
1438
|
}
|
|
1430
1439
|
const records = await query.toArray();
|
|
1431
|
-
const
|
|
1432
|
-
const scores = processResultWithTypeConversion(records, schema);
|
|
1440
|
+
const scores = await Promise.all(records.map(async (record) => await this.transformScoreRow(record)));
|
|
1433
1441
|
return {
|
|
1434
1442
|
pagination: {
|
|
1435
1443
|
page,
|
|
@@ -1471,8 +1479,7 @@ var StoreScoresLance = class extends ScoresStorage {
|
|
|
1471
1479
|
if (start > 0) query = query.offset(start);
|
|
1472
1480
|
}
|
|
1473
1481
|
const records = await query.toArray();
|
|
1474
|
-
const
|
|
1475
|
-
const scores = processResultWithTypeConversion(records, schema);
|
|
1482
|
+
const scores = await Promise.all(records.map(async (record) => await this.transformScoreRow(record)));
|
|
1476
1483
|
return {
|
|
1477
1484
|
pagination: {
|
|
1478
1485
|
page,
|
|
@@ -1553,11 +1560,13 @@ var StoreWorkflowsLance = class extends WorkflowsStorage {
|
|
|
1553
1560
|
} else {
|
|
1554
1561
|
createdAt = now;
|
|
1555
1562
|
}
|
|
1563
|
+
const { status, value, ...rest } = snapshot;
|
|
1556
1564
|
const record = {
|
|
1557
1565
|
workflow_name: workflowName,
|
|
1558
1566
|
run_id: runId,
|
|
1559
1567
|
resourceId,
|
|
1560
|
-
snapshot: JSON.stringify(
|
|
1568
|
+
snapshot: JSON.stringify({ status, value, ...rest }),
|
|
1569
|
+
// this is to ensure status is always just before value, for when querying the db by status
|
|
1561
1570
|
createdAt,
|
|
1562
1571
|
updatedAt: now
|
|
1563
1572
|
};
|
|
@@ -1627,6 +1636,10 @@ var StoreWorkflowsLance = class extends WorkflowsStorage {
|
|
|
1627
1636
|
if (args?.workflowName) {
|
|
1628
1637
|
conditions.push(`workflow_name = '${args.workflowName.replace(/'/g, "''")}'`);
|
|
1629
1638
|
}
|
|
1639
|
+
if (args?.status) {
|
|
1640
|
+
const escapedStatus = args.status.replace(/\\/g, "\\\\").replace(/'/g, "''").replace(/%/g, "\\%").replace(/_/g, "\\_");
|
|
1641
|
+
conditions.push(`\`snapshot\` LIKE '%"status":"${escapedStatus}","value"%'`);
|
|
1642
|
+
}
|
|
1630
1643
|
if (args?.resourceId) {
|
|
1631
1644
|
conditions.push(`\`resourceId\` = '${args.resourceId}'`);
|
|
1632
1645
|
}
|
|
@@ -2837,7 +2850,44 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
2837
2850
|
);
|
|
2838
2851
|
}
|
|
2839
2852
|
}
|
|
2840
|
-
async updateVector(
|
|
2853
|
+
async updateVector(params) {
|
|
2854
|
+
const { indexName, update } = params;
|
|
2855
|
+
if ("id" in params && "filter" in params && params.id && params.filter) {
|
|
2856
|
+
throw new MastraError({
|
|
2857
|
+
id: "STORAGE_LANCE_VECTOR_UPDATE_VECTOR_INVALID_ARGS",
|
|
2858
|
+
domain: ErrorDomain.STORAGE,
|
|
2859
|
+
category: ErrorCategory.USER,
|
|
2860
|
+
text: "id and filter are mutually exclusive",
|
|
2861
|
+
details: { indexName }
|
|
2862
|
+
});
|
|
2863
|
+
}
|
|
2864
|
+
if (!("id" in params || "filter" in params) || !params.id && !params.filter) {
|
|
2865
|
+
throw new MastraError({
|
|
2866
|
+
id: "STORAGE_LANCE_VECTOR_UPDATE_VECTOR_INVALID_ARGS",
|
|
2867
|
+
domain: ErrorDomain.STORAGE,
|
|
2868
|
+
category: ErrorCategory.USER,
|
|
2869
|
+
text: "Either id or filter must be provided",
|
|
2870
|
+
details: { indexName }
|
|
2871
|
+
});
|
|
2872
|
+
}
|
|
2873
|
+
if ("filter" in params && params.filter && Object.keys(params.filter).length === 0) {
|
|
2874
|
+
throw new MastraError({
|
|
2875
|
+
id: "STORAGE_LANCE_VECTOR_UPDATE_VECTOR_INVALID_ARGS",
|
|
2876
|
+
domain: ErrorDomain.STORAGE,
|
|
2877
|
+
category: ErrorCategory.USER,
|
|
2878
|
+
text: "Cannot update with empty filter",
|
|
2879
|
+
details: { indexName }
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
if (!update.vector && !update.metadata) {
|
|
2883
|
+
throw new MastraError({
|
|
2884
|
+
id: "STORAGE_LANCE_VECTOR_UPDATE_VECTOR_INVALID_ARGS",
|
|
2885
|
+
domain: ErrorDomain.STORAGE,
|
|
2886
|
+
category: ErrorCategory.USER,
|
|
2887
|
+
text: "No updates provided",
|
|
2888
|
+
details: { indexName }
|
|
2889
|
+
});
|
|
2890
|
+
}
|
|
2841
2891
|
try {
|
|
2842
2892
|
if (!this.lanceClient) {
|
|
2843
2893
|
throw new Error("LanceDB client not initialized. Use LanceVectorStore.create() to create an instance");
|
|
@@ -2845,21 +2895,6 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
2845
2895
|
if (!indexName) {
|
|
2846
2896
|
throw new Error("indexName is required");
|
|
2847
2897
|
}
|
|
2848
|
-
if (!id) {
|
|
2849
|
-
throw new Error("id is required");
|
|
2850
|
-
}
|
|
2851
|
-
} catch (err) {
|
|
2852
|
-
throw new MastraError(
|
|
2853
|
-
{
|
|
2854
|
-
id: "STORAGE_LANCE_VECTOR_UPDATE_VECTOR_FAILED_INVALID_ARGS",
|
|
2855
|
-
domain: ErrorDomain.STORAGE,
|
|
2856
|
-
category: ErrorCategory.USER,
|
|
2857
|
-
details: { indexName, id }
|
|
2858
|
-
},
|
|
2859
|
-
err
|
|
2860
|
-
);
|
|
2861
|
-
}
|
|
2862
|
-
try {
|
|
2863
2898
|
const tables = await this.lanceClient.tableNames();
|
|
2864
2899
|
for (const tableName of tables) {
|
|
2865
2900
|
this.logger.debug("Checking table:" + tableName);
|
|
@@ -2869,39 +2904,66 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
2869
2904
|
const hasColumn = schema.fields.some((field) => field.name === indexName);
|
|
2870
2905
|
if (hasColumn) {
|
|
2871
2906
|
this.logger.debug(`Found column ${indexName} in table ${tableName}`);
|
|
2872
|
-
|
|
2873
|
-
if (
|
|
2874
|
-
|
|
2907
|
+
let whereClause;
|
|
2908
|
+
if ("id" in params && params.id) {
|
|
2909
|
+
whereClause = `id = '${params.id}'`;
|
|
2910
|
+
} else if ("filter" in params && params.filter) {
|
|
2911
|
+
const translator = new LanceFilterTranslator();
|
|
2912
|
+
const processFilterKeys = (filter) => {
|
|
2913
|
+
const processedFilter = {};
|
|
2914
|
+
Object.entries(filter).forEach(([key, value]) => {
|
|
2915
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
2916
|
+
Object.entries(value).forEach(([nestedKey, nestedValue]) => {
|
|
2917
|
+
processedFilter[`metadata_${key}_${nestedKey}`] = nestedValue;
|
|
2918
|
+
});
|
|
2919
|
+
} else {
|
|
2920
|
+
processedFilter[`metadata_${key}`] = value;
|
|
2921
|
+
}
|
|
2922
|
+
});
|
|
2923
|
+
return processedFilter;
|
|
2924
|
+
};
|
|
2925
|
+
const prefixedFilter = processFilterKeys(params.filter);
|
|
2926
|
+
whereClause = translator.translate(prefixedFilter) || "";
|
|
2927
|
+
if (!whereClause) {
|
|
2928
|
+
throw new Error("Failed to translate filter to SQL");
|
|
2929
|
+
}
|
|
2930
|
+
} else {
|
|
2931
|
+
throw new Error("Either id or filter must be provided");
|
|
2875
2932
|
}
|
|
2876
|
-
const
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2933
|
+
const existingRecords = await table.query().where(whereClause).select(schema.fields.map((field) => field.name)).toArray();
|
|
2934
|
+
if (existingRecords.length === 0) {
|
|
2935
|
+
this.logger.info(`No records found matching criteria in table ${tableName}`);
|
|
2936
|
+
return;
|
|
2937
|
+
}
|
|
2938
|
+
const updatedRecords = existingRecords.map((record) => {
|
|
2939
|
+
const rowData = {};
|
|
2940
|
+
Object.entries(record).forEach(([key, value]) => {
|
|
2941
|
+
if (key !== "_distance") {
|
|
2942
|
+
if (key === indexName) {
|
|
2943
|
+
if (update.vector) {
|
|
2944
|
+
rowData[key] = update.vector;
|
|
2887
2945
|
} else {
|
|
2888
|
-
|
|
2946
|
+
if (Array.isArray(value)) {
|
|
2947
|
+
rowData[key] = [...value];
|
|
2948
|
+
} else if (typeof value === "object" && value !== null) {
|
|
2949
|
+
rowData[key] = Array.from(value);
|
|
2950
|
+
} else {
|
|
2951
|
+
rowData[key] = value;
|
|
2952
|
+
}
|
|
2889
2953
|
}
|
|
2954
|
+
} else {
|
|
2955
|
+
rowData[key] = value;
|
|
2890
2956
|
}
|
|
2891
|
-
} else {
|
|
2892
|
-
rowData[key] = value;
|
|
2893
2957
|
}
|
|
2958
|
+
});
|
|
2959
|
+
if (update.metadata) {
|
|
2960
|
+
Object.entries(update.metadata).forEach(([key, value]) => {
|
|
2961
|
+
rowData[`metadata_${key}`] = value;
|
|
2962
|
+
});
|
|
2894
2963
|
}
|
|
2964
|
+
return rowData;
|
|
2895
2965
|
});
|
|
2896
|
-
|
|
2897
|
-
rowData[indexName] = update.vector;
|
|
2898
|
-
}
|
|
2899
|
-
if (update.metadata) {
|
|
2900
|
-
Object.entries(update.metadata).forEach(([key, value]) => {
|
|
2901
|
-
rowData[`metadata_${key}`] = value;
|
|
2902
|
-
});
|
|
2903
|
-
}
|
|
2904
|
-
await table.add([rowData], { mode: "overwrite" });
|
|
2966
|
+
await table.add(updatedRecords, { mode: "overwrite" });
|
|
2905
2967
|
return;
|
|
2906
2968
|
}
|
|
2907
2969
|
} catch (err) {
|
|
@@ -2911,12 +2973,19 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
2911
2973
|
}
|
|
2912
2974
|
throw new Error(`No table found with column/index '${indexName}'`);
|
|
2913
2975
|
} catch (error) {
|
|
2976
|
+
if (error instanceof MastraError) throw error;
|
|
2914
2977
|
throw new MastraError(
|
|
2915
2978
|
{
|
|
2916
2979
|
id: "STORAGE_LANCE_VECTOR_UPDATE_VECTOR_FAILED",
|
|
2917
2980
|
domain: ErrorDomain.STORAGE,
|
|
2918
2981
|
category: ErrorCategory.THIRD_PARTY,
|
|
2919
|
-
details: {
|
|
2982
|
+
details: {
|
|
2983
|
+
indexName,
|
|
2984
|
+
..."id" in params && params.id && { id: params.id },
|
|
2985
|
+
..."filter" in params && params.filter && { filter: JSON.stringify(params.filter) },
|
|
2986
|
+
hasVector: !!update.vector,
|
|
2987
|
+
hasMetadata: !!update.metadata
|
|
2988
|
+
}
|
|
2920
2989
|
},
|
|
2921
2990
|
error
|
|
2922
2991
|
);
|
|
@@ -2939,7 +3008,10 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
2939
3008
|
id: "STORAGE_LANCE_VECTOR_DELETE_VECTOR_FAILED_INVALID_ARGS",
|
|
2940
3009
|
domain: ErrorDomain.STORAGE,
|
|
2941
3010
|
category: ErrorCategory.USER,
|
|
2942
|
-
details: {
|
|
3011
|
+
details: {
|
|
3012
|
+
indexName,
|
|
3013
|
+
...id && { id }
|
|
3014
|
+
}
|
|
2943
3015
|
},
|
|
2944
3016
|
err
|
|
2945
3017
|
);
|
|
@@ -2969,7 +3041,10 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
2969
3041
|
id: "STORAGE_LANCE_VECTOR_DELETE_VECTOR_FAILED",
|
|
2970
3042
|
domain: ErrorDomain.STORAGE,
|
|
2971
3043
|
category: ErrorCategory.THIRD_PARTY,
|
|
2972
|
-
details: {
|
|
3044
|
+
details: {
|
|
3045
|
+
indexName,
|
|
3046
|
+
...id && { id }
|
|
3047
|
+
}
|
|
2973
3048
|
},
|
|
2974
3049
|
error
|
|
2975
3050
|
);
|
|
@@ -3000,6 +3075,109 @@ var LanceVectorStore = class _LanceVectorStore extends MastraVector {
|
|
|
3000
3075
|
});
|
|
3001
3076
|
return result;
|
|
3002
3077
|
}
|
|
3078
|
+
async deleteVectors({ indexName, filter, ids }) {
|
|
3079
|
+
if (ids && filter) {
|
|
3080
|
+
throw new MastraError({
|
|
3081
|
+
id: "STORAGE_LANCE_VECTOR_DELETE_VECTORS_INVALID_ARGS",
|
|
3082
|
+
domain: ErrorDomain.STORAGE,
|
|
3083
|
+
category: ErrorCategory.USER,
|
|
3084
|
+
text: "ids and filter are mutually exclusive",
|
|
3085
|
+
details: { indexName }
|
|
3086
|
+
});
|
|
3087
|
+
}
|
|
3088
|
+
if (!ids && !filter) {
|
|
3089
|
+
throw new MastraError({
|
|
3090
|
+
id: "STORAGE_LANCE_VECTOR_DELETE_VECTORS_INVALID_ARGS",
|
|
3091
|
+
domain: ErrorDomain.STORAGE,
|
|
3092
|
+
category: ErrorCategory.USER,
|
|
3093
|
+
text: "Either filter or ids must be provided",
|
|
3094
|
+
details: { indexName }
|
|
3095
|
+
});
|
|
3096
|
+
}
|
|
3097
|
+
if (ids && ids.length === 0) {
|
|
3098
|
+
throw new MastraError({
|
|
3099
|
+
id: "STORAGE_LANCE_VECTOR_DELETE_VECTORS_INVALID_ARGS",
|
|
3100
|
+
domain: ErrorDomain.STORAGE,
|
|
3101
|
+
category: ErrorCategory.USER,
|
|
3102
|
+
text: "Cannot delete with empty ids array",
|
|
3103
|
+
details: { indexName }
|
|
3104
|
+
});
|
|
3105
|
+
}
|
|
3106
|
+
if (filter && Object.keys(filter).length === 0) {
|
|
3107
|
+
throw new MastraError({
|
|
3108
|
+
id: "STORAGE_LANCE_VECTOR_DELETE_VECTORS_INVALID_ARGS",
|
|
3109
|
+
domain: ErrorDomain.STORAGE,
|
|
3110
|
+
category: ErrorCategory.USER,
|
|
3111
|
+
text: "Cannot delete with empty filter",
|
|
3112
|
+
details: { indexName }
|
|
3113
|
+
});
|
|
3114
|
+
}
|
|
3115
|
+
try {
|
|
3116
|
+
if (!this.lanceClient) {
|
|
3117
|
+
throw new Error("LanceDB client not initialized. Use LanceVectorStore.create() to create an instance");
|
|
3118
|
+
}
|
|
3119
|
+
if (!indexName) {
|
|
3120
|
+
throw new Error("indexName is required");
|
|
3121
|
+
}
|
|
3122
|
+
const tables = await this.lanceClient.tableNames();
|
|
3123
|
+
for (const tableName of tables) {
|
|
3124
|
+
this.logger.debug("Checking table:" + tableName);
|
|
3125
|
+
const table = await this.lanceClient.openTable(tableName);
|
|
3126
|
+
try {
|
|
3127
|
+
const schema = await table.schema();
|
|
3128
|
+
const hasColumn = schema.fields.some((field) => field.name === indexName);
|
|
3129
|
+
if (hasColumn) {
|
|
3130
|
+
this.logger.debug(`Found column ${indexName} in table ${tableName}`);
|
|
3131
|
+
if (ids) {
|
|
3132
|
+
const idsConditions = ids.map((id) => `id = '${id}'`).join(" OR ");
|
|
3133
|
+
await table.delete(idsConditions);
|
|
3134
|
+
} else if (filter) {
|
|
3135
|
+
const translator = new LanceFilterTranslator();
|
|
3136
|
+
const processFilterKeys = (filter2) => {
|
|
3137
|
+
const processedFilter = {};
|
|
3138
|
+
Object.entries(filter2).forEach(([key, value]) => {
|
|
3139
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
3140
|
+
Object.entries(value).forEach(([nestedKey, nestedValue]) => {
|
|
3141
|
+
processedFilter[`metadata_${key}_${nestedKey}`] = nestedValue;
|
|
3142
|
+
});
|
|
3143
|
+
} else {
|
|
3144
|
+
processedFilter[`metadata_${key}`] = value;
|
|
3145
|
+
}
|
|
3146
|
+
});
|
|
3147
|
+
return processedFilter;
|
|
3148
|
+
};
|
|
3149
|
+
const prefixedFilter = processFilterKeys(filter);
|
|
3150
|
+
const whereClause = translator.translate(prefixedFilter);
|
|
3151
|
+
if (!whereClause) {
|
|
3152
|
+
throw new Error("Failed to translate filter to SQL");
|
|
3153
|
+
}
|
|
3154
|
+
await table.delete(whereClause);
|
|
3155
|
+
}
|
|
3156
|
+
return;
|
|
3157
|
+
}
|
|
3158
|
+
} catch (err) {
|
|
3159
|
+
this.logger.error(`Error checking schema for table ${tableName}:` + err);
|
|
3160
|
+
continue;
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
throw new Error(`No table found with column/index '${indexName}'`);
|
|
3164
|
+
} catch (error) {
|
|
3165
|
+
if (error instanceof MastraError) throw error;
|
|
3166
|
+
throw new MastraError(
|
|
3167
|
+
{
|
|
3168
|
+
id: "STORAGE_LANCE_VECTOR_DELETE_VECTORS_FAILED",
|
|
3169
|
+
domain: ErrorDomain.STORAGE,
|
|
3170
|
+
category: ErrorCategory.THIRD_PARTY,
|
|
3171
|
+
details: {
|
|
3172
|
+
indexName,
|
|
3173
|
+
...filter && { filter: JSON.stringify(filter) },
|
|
3174
|
+
...ids && { idsCount: ids.length }
|
|
3175
|
+
}
|
|
3176
|
+
},
|
|
3177
|
+
error
|
|
3178
|
+
);
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3003
3181
|
};
|
|
3004
3182
|
|
|
3005
3183
|
export { LanceStorage, LanceVectorStore };
|