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

Searching in fields that do not exist #284

Open
majsan opened this issue Aug 30, 2024 · 1 comment
Open

Searching in fields that do not exist #284

majsan opened this issue Aug 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@majsan
Copy link
Member

majsan commented Aug 30, 2024

Searching in a field that does not exist works: equals|non_configured_field|3 simply returns zero hits.

However, if there is a path to the field equals|path.non_configured_field||3 it will only behave the same way if path exists. If a part of path does not exist, we get a 500 Internal server error.

The bad error should be replaced with a more descriptive one. I also think that the first case should fail if the resource has additionalProperties: false. Since this setting requires that all fields be specified in the configuration, a query on a field that is not in the configuration would always fail and it would be easier for users if this was made clear.

@majsan majsan added the enhancement New feature or request label Aug 30, 2024
@nick8325
Copy link
Contributor

nick8325 commented Sep 6, 2024

Now it at least doesn't crash on equals|path.non_configured_field|3. Leaving this open though since as you say we probably should crash if additionalProperties: false is given.

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

No branches or pull requests

2 participants