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.
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.
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 ifpath
exists. If a part ofpath
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.