Skip to content

Commit

Permalink
Fix scroll api (#10)
Browse files Browse the repository at this point in the history
* add link to examples
* add missing `offset` param in scroll api
  • Loading branch information
generall authored May 1, 2023
1 parent aeae1d6 commit cbc27fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/smart-bees-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@qdrant/js-client-rest': patch
'@qdrant/qdrant-js': patch
---

Add missing offset param in scroll
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const result = await client.getCollections();
console.log('List of collections:', result.collections);
```

More examples can be found in the [`examples`](./examples) folder.



## Releases

Expand Down
4 changes: 3 additions & 1 deletion packages/js-client-rest/src/qdrant-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export class QdrantClient {
* Scroll over all (matching) points in the collection.
* @param collection_name Name of the collection
* @param {object} args
* - scroll_filter: If provided - only returns points matching filtering conditions
* - filter: If provided - only returns points matching filtering conditions
* - limit: How many points to return
* - offset: If provided - skip points with ids less than given `offset`
* - with_payload:
Expand Down Expand Up @@ -371,13 +371,15 @@ export class QdrantClient {
filter,
consistency,
limit = 10,
offset,
with_payload = true,
with_vector = false,
}: SchemaFor<'ScrollRequest'> & {consistency?: SchemaFor<'ReadConsistency'>} = {},
) {
const response = await this._openApiClient.points.scrollPoints({
collection_name,
limit,
offset,
filter,
with_payload,
with_vector,
Expand Down

0 comments on commit cbc27fa

Please sign in to comment.