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

Document "no limit" behavior for LanceQueryBuilder #796

Closed
dconathan opened this issue Jan 9, 2024 · 1 comment · Fixed by #800
Closed

Document "no limit" behavior for LanceQueryBuilder #796

dconathan opened this issue Jan 9, 2024 · 1 comment · Fixed by #800
Labels
documentation Improvements or additions to documentation

Comments

@dconathan
Copy link

Description

def limit(self, limit: int) -> LanceQueryBuilder:

The type annotation for LanceQueryBuilder.limit() says limit must be an int and there's no mention of what you should pass if you want "no limit" (it's None ... a user might think you need to pass in limit=-1?). Type annotation should be changed to Optional[int] and None behavior should be documented accordingly.

Somewhat related - it is a little non-intuitive that the default behavior is limit = 10 as opposed to no limit.

Link

No response

@dconathan dconathan added the documentation Improvements or additions to documentation label Jan 9, 2024
@dconathan dconathan changed the title Docum Document "no limit" behavior for LanceQueryBuilder Jan 9, 2024
@changhiskhan
Copy link
Contributor

The API is focused on search so a limit is always required in that case. And we just set a limit of 10 to prevent users from accidentally shooting themselves in the foot. E.g., BI tools always have a limit that's on by default (but that you can manually turn off).

On the documentation gap, that's a good point. Let's keep this issue open and we'll make a fix (also open to PRs if you're interested).

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

Successfully merging a pull request may close this issue.

2 participants