Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queryIterator limit field is not documented properly #360

Open
teynar opened this issue Sep 25, 2024 · 1 comment
Open

queryIterator limit field is not documented properly #360

teynar opened this issue Sep 25, 2024 · 1 comment

Comments

@teynar
Copy link

teynar commented Sep 25, 2024

According to this README.md:

limit: total, // optional, how much data do you want to fetch, if not set, fetch all the data, be careful if you have large data set

https://github.com/milvus-io/milvus-sdk-node/blame/9d4cc1beb11b554902bc57c2d96f9c817b0aff58/README.md#L72-L94

It says this field is optional, but in reality, it is currently required as shown here:

export interface QueryIteratorReq
extends Omit<QueryReq, 'ids' | 'offset' | 'limit'> {
limit: number;
batchSize: number;
}

In the Python SDK, if the limit is set to -1, then it means that there is no limit to the query operation.

Therefore I believe that this should be done:

Optionally set an exported constant for the -1 value (NO_LIMIT) for users to use which is considered in the typescript type

And do one of these options:
a) Update this piece of documentation and state that -1 means "no limit", refer to the constant if it exists
b) Allow the limit field to be not defined and default to -1 as "no limit", refer to the constant if it exists

@shanghaikid
Copy link
Contributor

you are right, my bad, I will fix this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants