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

[SearchBar] Dates, Booleans, Numbers and Range Clauses #485

Merged
merged 1 commit into from
Mar 30, 2018
Merged

[SearchBar] Dates, Booleans, Numbers and Range Clauses #485

merged 1 commit into from
Mar 30, 2018

Commits on Mar 30, 2018

  1. [SearchBar] Dates, Booleans, Numbers and Range Clauses

    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).
    uboness committed Mar 30, 2018
    Configuration menu
    Copy the full SHA
    aefcd05 View commit details
    Browse the repository at this point in the history