[SearchBar] Dates, Booleans, Numbers and Range Clauses#485
Merged
uboness merged 1 commit intoelastic:masterfrom Mar 30, 2018
uboness:feature/search_bar_range
Merged
[SearchBar] Dates, Booleans, Numbers and Range Clauses#485uboness merged 1 commit intoelastic:masterfrom uboness:feature/search_bar_range
uboness merged 1 commit intoelastic:masterfrom
uboness:feature/search_bar_range
Conversation
chrisronline
approved these changes
Mar 27, 2018
Contributor
chrisronline
left a comment
There was a problem hiding this comment.
LGTM! I'm excited for this!
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added date, boolean and number support to the Query language. With that, also added support for the following operations on field clauses:
>)>=)<)<=)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 monthandlast/next month/year.Date operation also respect the granularity of the date.. for example,
todayrefers to the full day, therefore the value has aDAYgranularity. Therefore, the expressiondate:'today'will match any value that falls in the full day (you can think about it as an implicit range)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
countis 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
EuiInMemoryTablewas updated such that it is now possible to setschema: trueon its search box. This will deduce a schema from the configured columns. (this can further be enhanced in the future, by supportingsearchableandvalidateproperties on the table columns).