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

Call of getDocuments() with empty document ID list returns all documents #219

Open
ChristophB opened this issue Jul 15, 2024 · 3 comments
Open
Labels
concepts/documents Related to concepts or documents logic invalid This doesn't seem right

Comments

@ChristophB
Copy link
Member

For queries with an empty result set, getDocuments(...) is called with an empty array as documentIds parameter and returns all documents. The expected behaviour is to return an empty list of documents.

@ChristophB ChristophB added invalid This doesn't seem right concepts/documents Related to concepts or documents logic labels Jul 15, 2024
@fmatthies
Copy link
Contributor

That's right. This is an oversight in the interaction between frontendbackend.
However, I would rather intercept this case in the frontend.

@ChristophB
Copy link
Member Author

ChristophB commented Jul 23, 2024

I would prefer to handle this case in the backend, because it does not feel right from a REST API perspective to return all documents.

@fmatthies
Copy link
Contributor

I understand the notion, but I have the feeling, that it's kind of odd to provide an empty filter (if it's empty nothing gets filtered) and get nothing in return. You might as well not request it at all if you know it gives an empty return?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concepts/documents Related to concepts or documents logic invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants