@vectorstores/qdrant 0.1.5 → 0.1.6

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/index.cjs CHANGED
@@ -175,9 +175,6 @@ var core = require('@vectorstores/core');
175
175
  const qdrantSearchParams = options && "qdrant_search_params" in options ? options.qdrant_search_params : undefined;
176
176
  let queryFilters;
177
177
  let searchParams;
178
- if (!query.queryEmbedding) {
179
- throw new Error("No query embedding provided");
180
- }
181
178
  if (qdrantFilters) {
182
179
  queryFilters = qdrantFilters;
183
180
  } else {
@@ -188,8 +185,14 @@ var core = require('@vectorstores/core');
188
185
  } else {
189
186
  searchParams = buildSearchParams(query);
190
187
  }
188
+ const queryVector = query.queryEmbedding;
189
+ if (!queryVector) {
190
+ throw new Error("Qdrant vector search requires a dense query embedding, even when falling back from BM25 or HYBRID modes.");
191
+ }
192
+ // For now, Qdrant implementation only supports dense vector search.
193
+ // BM25 and HYBRID will fallback to dense vector search if no sparse vectors are configured.
191
194
  const result = await this.db.query(this.collectionName, {
192
- query: query.queryEmbedding,
195
+ query: queryVector,
193
196
  limit: query.similarityTopK,
194
197
  with_payload: true,
195
198
  with_vector: false,
@@ -173,9 +173,6 @@ import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, Fi
173
173
  const qdrantSearchParams = options && "qdrant_search_params" in options ? options.qdrant_search_params : undefined;
174
174
  let queryFilters;
175
175
  let searchParams;
176
- if (!query.queryEmbedding) {
177
- throw new Error("No query embedding provided");
178
- }
179
176
  if (qdrantFilters) {
180
177
  queryFilters = qdrantFilters;
181
178
  } else {
@@ -186,8 +183,14 @@ import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, Fi
186
183
  } else {
187
184
  searchParams = buildSearchParams(query);
188
185
  }
186
+ const queryVector = query.queryEmbedding;
187
+ if (!queryVector) {
188
+ throw new Error("Qdrant vector search requires a dense query embedding, even when falling back from BM25 or HYBRID modes.");
189
+ }
190
+ // For now, Qdrant implementation only supports dense vector search.
191
+ // BM25 and HYBRID will fallback to dense vector search if no sparse vectors are configured.
189
192
  const result = await this.db.query(this.collectionName, {
190
- query: query.queryEmbedding,
193
+ query: queryVector,
191
194
  limit: query.similarityTopK,
192
195
  with_payload: true,
193
196
  with_vector: false,
package/dist/index.js CHANGED
@@ -173,9 +173,6 @@ import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, Fi
173
173
  const qdrantSearchParams = options && "qdrant_search_params" in options ? options.qdrant_search_params : undefined;
174
174
  let queryFilters;
175
175
  let searchParams;
176
- if (!query.queryEmbedding) {
177
- throw new Error("No query embedding provided");
178
- }
179
176
  if (qdrantFilters) {
180
177
  queryFilters = qdrantFilters;
181
178
  } else {
@@ -186,8 +183,14 @@ import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, Fi
186
183
  } else {
187
184
  searchParams = buildSearchParams(query);
188
185
  }
186
+ const queryVector = query.queryEmbedding;
187
+ if (!queryVector) {
188
+ throw new Error("Qdrant vector search requires a dense query embedding, even when falling back from BM25 or HYBRID modes.");
189
+ }
190
+ // For now, Qdrant implementation only supports dense vector search.
191
+ // BM25 and HYBRID will fallback to dense vector search if no sparse vectors are configured.
189
192
  const result = await this.db.query(this.collectionName, {
190
- query: query.queryEmbedding,
193
+ query: queryVector,
191
194
  limit: query.similarityTopK,
192
195
  with_payload: true,
193
196
  with_vector: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vectorstores/qdrant",
3
3
  "description": "Qdrant Storage for vectorstores",
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "vitest": "^2.1.9",
38
- "@vectorstores/core": "0.1.5",
38
+ "@vectorstores/core": "0.1.6",
39
39
  "@vectorstores/env": "0.1.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@vectorstores/core": "0.1.5",
42
+ "@vectorstores/core": "0.1.6",
43
43
  "@vectorstores/env": "0.1.0"
44
44
  },
45
45
  "dependencies": {