@mastra/elasticsearch 1.4.1 → 1.4.2
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/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-elasticsearch
|
|
|
3
3
|
description: Documentation for @mastra/elasticsearch. Use when working with @mastra/elasticsearch APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/elasticsearch"
|
|
6
|
-
version: "1.4.
|
|
6
|
+
version: "1.4.2"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -650,7 +650,7 @@ Key metadata considerations:
|
|
|
650
650
|
|
|
651
651
|
## Deleting vectors
|
|
652
652
|
|
|
653
|
-
|
|
653
|
+
Use `deleteVectors` with a metadata filter to remove embeddings associated with a document. This is useful for cleaning up stale vectors after a document is deleted or updated.
|
|
654
654
|
|
|
655
655
|
### Delete by Metadata Filter
|
|
656
656
|
|
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ let crypto$1 = require("crypto");
|
|
|
31
31
|
crypto$1 = __toESM(crypto$1, 1);
|
|
32
32
|
let _mastra_core_evals = require("@mastra/core/evals");
|
|
33
33
|
//#region package.json
|
|
34
|
-
var version = "1.4.
|
|
34
|
+
var version = "1.4.2";
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/vector/filter.ts
|
|
37
37
|
/**
|
|
@@ -1909,6 +1909,7 @@ var MemoryElasticSearch = class extends _mastra_core_storage.MemoryStorage {
|
|
|
1909
1909
|
updatedAt: now
|
|
1910
1910
|
};
|
|
1911
1911
|
const clonedMessages = [];
|
|
1912
|
+
const messageIdMap = Object.create(null);
|
|
1912
1913
|
const targetResourceId = resourceId || sourceThread.resourceId;
|
|
1913
1914
|
const entries = [];
|
|
1914
1915
|
for (let i = 0; i < sourceMessages.length; i++) {
|
|
@@ -1933,6 +1934,7 @@ var MemoryElasticSearch = class extends _mastra_core_storage.MemoryStorage {
|
|
|
1933
1934
|
value: { threadId: newThreadId }
|
|
1934
1935
|
});
|
|
1935
1936
|
clonedMessages.push(newMessage);
|
|
1937
|
+
messageIdMap[sourceMsg.id] = newMessageId;
|
|
1936
1938
|
}
|
|
1937
1939
|
await this.db.insert({
|
|
1938
1940
|
tableName: _mastra_core_storage.TABLE_THREADS,
|
|
@@ -1944,7 +1946,8 @@ var MemoryElasticSearch = class extends _mastra_core_storage.MemoryStorage {
|
|
|
1944
1946
|
});
|
|
1945
1947
|
return {
|
|
1946
1948
|
thread: newThread,
|
|
1947
|
-
clonedMessages
|
|
1949
|
+
clonedMessages,
|
|
1950
|
+
messageIdMap
|
|
1948
1951
|
};
|
|
1949
1952
|
} catch (error) {
|
|
1950
1953
|
if (error instanceof _mastra_core_error.MastraError) throw error;
|