-
Notifications
You must be signed in to change notification settings - Fork 199
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
If FunctionScore does not have any functions breaks query #36
Comments
The same is with empty bool query, empty filtered query and other queries that behaviour is defined through setters (not constructor). It is open for discussion if ElasticsearchDSL should validate these queries. |
I think that it could be too much effort to maintain all possible cases when this could happen. |
That would be a massive responsibility to validate whole queries. We cannot validate one scenario, so it's all or none. The exception in query if there is no function set coud be a solution for better error handling, but as I said previosly, query validation we should take very carefully. |
After long discussions and investigation. We believe that query structure validation is currently not a DSL responsibility. We simply providing a way to generate an array in objective perspective by asuming the user knows what he is writing. Query validation should be performed in the native client as lowest part in the chain. |
No description provided.
The text was updated successfully, but these errors were encountered: