-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eval 'now-1d' date expressions (#143)
Here is an alternative date math expression renderer. This renderer evaluates expressions on Quesma side. Evaluated times are passed to the database as literals. Tests rely on the original (it uses "interval") renderer. We don't have a "current time provider" component right now. Code is simple, but plumbing is ..... @trzysiek Please take a look
- Loading branch information
Showing
10 changed files
with
225 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
POST http://localhost:8080/kibana_sample_data_ecommerce/_search | ||
Content-Type: application/json | ||
|
||
{ | ||
"_source": { | ||
"excludes": [] | ||
}, | ||
"aggs": { | ||
"2": { | ||
"date_range": { | ||
"field": "timestamp", | ||
"ranges": [ | ||
{ | ||
"to": "now" | ||
}, | ||
{ | ||
"from": "now-3w/d", | ||
"to": "now" | ||
}, | ||
{ | ||
"from": "2024-04-14" | ||
} | ||
], | ||
"time_zone": "Europe/Warsaw" | ||
} | ||
} | ||
}, | ||
"docvalue_fields": [ | ||
{ | ||
"field": "customer_birth_date", | ||
"format": "date_time" | ||
}, | ||
{ | ||
"field": "order_date", | ||
"format": "date_time" | ||
}, | ||
{ | ||
"field": "products.created_on", | ||
"format": "date_time" | ||
} | ||
], | ||
"query": { | ||
"bool": { | ||
"filter": [ | ||
{ | ||
"match_all": {} | ||
}, | ||
{ | ||
"range": { | ||
"timestamp": { | ||
"format": "strict_date_optional_time", | ||
"gte": "2024-04-06T07:28:50.059Z", | ||
"lte": "2024-04-16T17:28:50.059Z" | ||
} | ||
} | ||
} | ||
], | ||
"must": [], | ||
"must_not": [], | ||
"should": [] | ||
} | ||
}, | ||
"script_fields": {}, | ||
"size": 0, | ||
"stored_fields": [ | ||
"*" | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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