elasticsearch - Range filters - accept each date -


i using range filters in elasticsearch different options like

"date" : { "gte" : "now-1d" } "date" : { "gte" : "now-1y" } 

(it depends on value of variable)

is possible define keyword accept kinds of date, if there no field date?

maybe like:

"date" : { "gte" : _all } 

have tried using "exists"? https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html should able combine 2 filters bool - should /should not , filter on date gte nnnn or not exists field: date (i'm assuming want filter on date range if have date, , include results date missing well)


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -