@mastra/lance 1.2.0-alpha.0 → 1.2.1-alpha.0
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 +34 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-rag-vector-databases.md +19 -2
- package/dist/docs/references/reference-storage-lance.md +1 -1
- package/dist/index.cjs +2975 -3677
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2968 -3669
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @mastra/lance
|
|
2
2
|
|
|
3
|
+
## 1.2.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dependencies updates: ([#19779](https://github.com/mastra-ai/mastra/pull/19779))
|
|
8
|
+
- Updated dependency [`@lancedb/lancedb@^0.31.0` ↗︎](https://www.npmjs.com/package/@lancedb/lancedb/v/0.31.0) (from `^0.22.3`, in `dependencies`)
|
|
9
|
+
- Updated dependencies [[`723aa54`](https://github.com/mastra-ai/mastra/commit/723aa5437106bdb708ae03c0ef6b77aa11291e73), [`723aa54`](https://github.com/mastra-ai/mastra/commit/723aa5437106bdb708ae03c0ef6b77aa11291e73), [`723aa54`](https://github.com/mastra-ai/mastra/commit/723aa5437106bdb708ae03c0ef6b77aa11291e73)]:
|
|
10
|
+
- @mastra/core@1.55.0-alpha.3
|
|
11
|
+
|
|
12
|
+
## 1.2.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- Added exact metadata filtering to message history queries across Memory APIs and supported storage providers. ([#19991](https://github.com/mastra-ai/mastra/pull/19991))
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
const messages = await memory.recall({
|
|
20
|
+
threadId: 'thread-1',
|
|
21
|
+
filter: {
|
|
22
|
+
metadata: {
|
|
23
|
+
status: 'done',
|
|
24
|
+
priority: 'high',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Multiple fields use AND semantics. Supported values are strings, finite numbers, booleans, and `null`.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`ce93a3c`](https://github.com/mastra-ai/mastra/commit/ce93a3c114ea1cbfbd576f3db41d7c26c9844f5b), [`5718a22`](https://github.com/mastra-ai/mastra/commit/5718a229281dcfd36bcd1f42a242e3717e510a33), [`a211d09`](https://github.com/mastra-ai/mastra/commit/a211d09185dc65a746534914cf38b67f21ee9bac), [`0dca9d0`](https://github.com/mastra-ai/mastra/commit/0dca9d0b1356024a53b72ea6f040db528b126caa), [`6218217`](https://github.com/mastra-ai/mastra/commit/62182171b6cfca0b099f1c6a77a2e65e7639ab86), [`5807d3a`](https://github.com/mastra-ai/mastra/commit/5807d3ae1d259b8b7d6df7e5bf2b485c694af9c8), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`05db566`](https://github.com/mastra-ai/mastra/commit/05db566fcbdcbf33d0bffca0c72ec30129e2e3ca), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`5718a22`](https://github.com/mastra-ai/mastra/commit/5718a229281dcfd36bcd1f42a242e3717e510a33), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`d1b7e3a`](https://github.com/mastra-ai/mastra/commit/d1b7e3a978a309a5653eeaa490d2d6c7c53bd093), [`29c584a`](https://github.com/mastra-ai/mastra/commit/29c584a13a88831e5ed1fdeb0ff8e82eae180433), [`c093146`](https://github.com/mastra-ai/mastra/commit/c0931466404d3c521308ea119cb165bb7e695155), [`8124754`](https://github.com/mastra-ai/mastra/commit/8124754ae89fbc69f8136d1df4a91904d0f84c4e), [`d12b2e4`](https://github.com/mastra-ai/mastra/commit/d12b2e4023fd9e3d3e93a9169f5088bcee2a849c)]:
|
|
35
|
+
- @mastra/core@1.54.0
|
|
36
|
+
|
|
3
37
|
## 1.2.0-alpha.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Storing embeddings in a vector database
|
|
4
4
|
|
|
5
|
-
After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across
|
|
5
|
+
After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across vector databases.
|
|
6
6
|
|
|
7
7
|
## Supported databases
|
|
8
8
|
|
|
@@ -35,6 +35,23 @@ For detailed setup instructions and best practices, see the [official MongoDB At
|
|
|
35
35
|
|
|
36
36
|
MongoDB works seamlessly with VoyageAI's embedding models, which are optimized for retrieval tasks. For complete examples and specialized models, see the [VoyageAI embeddings documentation](https://mastra.ai/models/embeddings) and [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb).
|
|
37
37
|
|
|
38
|
+
### Hybrid Search (Vector + Full-Text)
|
|
39
|
+
|
|
40
|
+
MongoDB supports hybrid search that fuses vector similarity with BM25 full-text search using server-side `$rankFusion` (requires MongoDB >= 8.0; generally available from 8.1, and enabled on Atlas 8.0.x). This is useful when you want to combine semantic and keyword-based retrieval:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
await store.createSearchIndex({ indexName: 'myCollection', fields: ['text'] })
|
|
44
|
+
const results = await store.hybridQuery({
|
|
45
|
+
indexName: 'myCollection',
|
|
46
|
+
queryVector: embedding,
|
|
47
|
+
query: 'search terms',
|
|
48
|
+
paths: ['text'],
|
|
49
|
+
topK: 10,
|
|
50
|
+
})
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
See the [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb) for details on `createSearchIndex()`, `textQuery()`, and `hybridQuery()`.
|
|
54
|
+
|
|
38
55
|
**PgVector**:
|
|
39
56
|
|
|
40
57
|
```ts
|
|
@@ -554,7 +571,7 @@ The upsert operation:
|
|
|
554
571
|
|
|
555
572
|
Vector stores support rich metadata (any JSON-serializable fields) for filtering and organization. Since metadata is stored with no fixed schema, use consistent field naming to avoid unexpected query results.
|
|
556
573
|
|
|
557
|
-
> **Warning:** Metadata is
|
|
574
|
+
> **Warning:** Metadata is important for vector storage. Without it, you'd only have numerical embeddings with no way to return the original text or filter results. Always store at least the source text as metadata.
|
|
558
575
|
|
|
559
576
|
```ts
|
|
560
577
|
// Store embeddings with rich metadata for better organization and filtering
|
|
@@ -117,7 +117,7 @@ LanceDB storage can be configured for different deployment scenarios:
|
|
|
117
117
|
```text
|
|
118
118
|
db://host:port
|
|
119
119
|
```
|
|
120
|
-
- **S3 Storage**: Use Amazon S3 for
|
|
120
|
+
- **S3 Storage**: Use Amazon S3 for high-capacity cloud storage
|
|
121
121
|
```text
|
|
122
122
|
s3://bucket/db
|
|
123
123
|
```
|