@mastra/qdrant 1.1.4 → 1.1.5-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.
@@ -3,7 +3,7 @@ name: mastra-qdrant
3
3
  description: Documentation for @mastra/qdrant. Use when working with @mastra/qdrant APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/qdrant"
6
- version: "1.1.4"
6
+ version: "1.1.5-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.4",
2
+ "version": "1.1.5-alpha.0",
3
3
  "package": "@mastra/qdrant",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -50,23 +50,25 @@ console.log(results)
50
50
 
51
51
  The `topK` parameter specifies the maximum number of most similar results to return from the vector search.
52
52
 
53
- Results include both the text content and a similarity score:
53
+ Each result includes an `id`, a similarity `score`, and the stored `metadata`. When you store chunk text in metadata, it's available as `metadata.text`:
54
54
 
55
55
  ```ts
56
56
  [
57
57
  {
58
- text: 'Climate change poses significant challenges...',
58
+ id: 'chunk-1',
59
59
  score: 0.89,
60
- metadata: { source: 'article1.txt' },
60
+ metadata: { text: 'Climate change poses significant challenges...', source: 'article1.txt' },
61
61
  },
62
62
  {
63
- text: 'Rising temperatures affect crop yields...',
63
+ id: 'chunk-2',
64
64
  score: 0.82,
65
- metadata: { source: 'article1.txt' },
65
+ metadata: { text: 'Rising temperatures affect crop yields...', source: 'article1.txt' },
66
66
  },
67
67
  ]
68
68
  ```
69
69
 
70
+ Results can also include `vector` when you set `includeVector: true`, and `document` when the store returns the original document (Chroma only).
71
+
70
72
  ## Advanced retrieval options
71
73
 
72
74
  ### Metadata Filtering
@@ -230,7 +230,7 @@ await store.upsert({
230
230
  **libSQL**:
231
231
 
232
232
  ```ts
233
- import { LibSQLVector } from '@mastra/core/vector/libsql'
233
+ import { LibSQLVector } from '@mastra/libsql'
234
234
 
235
235
  const store = new LibSQLVector({
236
236
  id: 'libsql-vector',
@@ -198,24 +198,28 @@ Query results are returned in this format:
198
198
  interface QueryResult {
199
199
  id: string
200
200
  score: number
201
- metadata: Record<string, any>
201
+ metadata?: Record<string, any>
202
202
  vector?: number[] // Only included if includeVector is true
203
203
  }
204
204
  ```
205
205
 
206
206
  ## Error handling
207
207
 
208
- The store throws typed errors that can be caught:
208
+ The store throws `MastraError` instances from `@mastra/core/error`:
209
209
 
210
210
  ```typescript
211
+ import { MastraError } from '@mastra/core/error'
212
+
211
213
  try {
212
214
  await store.query({
213
215
  indexName: 'index_name',
214
216
  queryVector: queryVector,
215
217
  })
216
218
  } catch (error) {
217
- if (error instanceof VectorStoreError) {
218
- console.log(error.code) // 'connection_failed' | 'invalid_dimension' | etc
219
+ if (error instanceof MastraError) {
220
+ console.log(error.id) // 'MASTRA_VECTOR_QDRANT_QUERY_FAILED'
221
+ console.log(error.domain) // 'STORAGE'
222
+ console.log(error.category) // 'USER' | 'THIRD_PARTY'
219
223
  console.log(error.details) // Additional error context
220
224
  }
221
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/qdrant",
3
- "version": "1.1.4",
3
+ "version": "1.1.5-alpha.0",
4
4
  "description": "Qdrant vector store provider for Mastra",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,10 +31,10 @@
31
31
  "tsx": "^4.23.1",
32
32
  "typescript": "^7.0.2",
33
33
  "vitest": "4.1.11",
34
- "@internal/storage-test-utils": "0.0.135",
35
- "@internal/types-builder": "0.0.114",
36
- "@internal/lint": "0.0.139",
37
- "@mastra/core": "1.73.0"
34
+ "@internal/lint": "0.0.144",
35
+ "@internal/storage-test-utils": "0.0.140",
36
+ "@mastra/core": "1.78.1-alpha.0",
37
+ "@internal/types-builder": "0.0.119"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@mastra/core": ">=1.0.0-0 <2.0.0-0"