How to create range filter
See original GitHub issueI want this:
"range": {
"@timestamp": {
"gte": "2014-12-3T16:00:00",
"lte": "now"
}
}
but this code does different thing:
s = Search( using=client, index="my_index" )
s = s.filter( 'range', gte='now-1h', lte='now', field='@timestamp' )
"range": {
"field": "@timestamp",
"gte": "now-1h",
"lte": "now"
}
@timestamp is put in the wrong place, how to correct it?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Filter data in a range or table - Microsoft Support
Select any cell within the range. · Select Data > Filter. Filter button · Select the column header arrow Filter arrow . ·...
Read more >JetSmartFilters: How to Create Range Filter - Crocoblock
How to create Range filter ... Go to WordPress Dashboard > Smart Filters and click the “Add New” button. Fill out the Title,...
Read more >Range filter—Help | ArcGIS for Desktop
Follow the steps below to set the Range filter on a model parameter: In the Catalog window or ArcToolbox window, right-click the model...
Read more >Range Filter
Range Filter · Right-click on the range filter to bring up the pop-up menu. · Select Filtering Scheme Properties. · Under Filter settings,...
Read more >Creating a Numeric Range Filter - Anzo® 5.3 Documentation
Creating a Numeric Range Filter · Open the Dashboard that you want to add the filter to. · In the Hi-Res Analytics main...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @garyelephant as far as i understand you are trying to implement a range filter in dsl. You can do something like this:
s.filter(‘range’, **{field_name: {“from”: from_date, “to”: to_date}})
In case you are trying to input the field name and date ranges from variables.
You can also replace lte and gte instead of from and to
I still don’t see how we could implement this consistently so I am closing the ticket.