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

Add limit parameter to client.data_object.get() REST query #181

Merged
merged 2 commits into from
Dec 15, 2022
Merged

Conversation

dirkkul
Copy link
Collaborator

@dirkkul dirkkul commented Dec 14, 2022

closes #179

Copy link
Member

@StefanBogdan StefanBogdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW there are more parameters: offset, sort, order (can be "asc" or "desc"). These are the same parameters as for Get` query using GraphQL. Here is how it is done there:

I am not sure anyone uses them, to be honest, because with GET /objects you cannot do any filtering, so I am not sure anyone is interested in this. Also with sort/'order' I am not sure how it would work when you have multiple classes with different properties. This was kind of the reason I never added limit, and these ones I mentioned here.

Do you think we should include those as well?

weaviate/data/crud_data.py Outdated Show resolved Hide resolved
weaviate/data/crud_data.py Outdated Show resolved Hide resolved
@dirkkul
Copy link
Collaborator Author

dirkkul commented Dec 15, 2022

Do you think we should include those as well?

Hmmm, if you don't think that anybody uses it, lets wait until people ask for it.

@dirkkul dirkkul merged commit c92d29b into main Dec 15, 2022
@dirkkul dirkkul deleted the get_limit branch December 15, 2022 13:27
@samos123
Copy link
Contributor

samos123 commented Dec 15, 2022

as a user, I was expecting all parameters to be available and thought I must be missing something. I could use the order or sort parameter as well. Right now I sort the results myself in python for one of the test cases in a connector 🤦

@dirkkul
Copy link
Collaborator Author

dirkkul commented Dec 16, 2022

ok, I'll create an issue for this. But I will probably not have for it this year

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

Successfully merging this pull request may close these issues.

Unable to set limit on client.data_object.get
3 participants