Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SearchBar] Dates, Booleans, Numbers and Range Clauses (#485)
Added date, boolean and number support to the Query language. With that, also added support for the following operations on field clauses: - greater than (`gt`) - greater than or equals (`gte`) - less than (`lt`) - less than or equals (`lte`) When it comes to date values, we try to cover a large range of user friendly formats, including terms such as: `today`, `yesterday`, `last week`, `next week`, `this week`, `this month` and `last/next month/year`. Date operation also respect the granularity of the date.. for example, `today` refers to the full day, therefore the value has a `DAY` granularity. Therefore, the expression `date:'today'` will match any value that falls in the full day. With this change, the search bar also supports a "schema" - this enables defining a more granular set of rules of how the query should be interpreted. For example, the schema may state that field `count` is of type 'number' - if the user tries to assign a string to this field, a parsing error will be triggered. Aside from the data types, the schema enables defining finer validation logic for the assigned field values. The `EuiInMemoryTable` was updated such that it is now possible to set `schema: true` on its search box. This will deduce a schema from the configured columns. (this can further be enhanced in the future, by supporting `searchable` and `validate` properties on the table columns).
- Loading branch information