-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Currently, much of what could be validated in queries and aggregations goes unchecked because of the fundamental assumption that we might be querying across heterogenous indexes where certain fields may be "unmapped".
A mis-typed field name or an invalid nested reference goes unchecked and returns no results rather than throwing any kind of error or warning. The users that enforce strict mappings across indexes are penalized by elasticsearch's need to support users with sloppier configurations.
Bad queries on strict schemas fail silently.
This issue proposes that we provide a new strict=true query option that checks all field names in query and agg clauses to ensure at query time that they actually relate to mapped fields. Any nested clauses will also check that subclauses are referencing nested fields correctly.
If strict query mode is set to "true" then errors will be thrown for unmapped fields. If strict is "false" (the default) then warnings could be passed back with search results.