forked from elastic/elasticsearch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The forceful no cache behaviour for range filter with now date match …
…expression should only be active if no rounding has been specified for `now` in the date range range expression (for example: `now/d`). Also the automatic now detection in range filters is overrideable by the `_cache` option. Closes elastic#4947 Relates to elastic#4846
- Loading branch information
Showing
9 changed files
with
191 additions
and
14 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
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
26 changes: 26 additions & 0 deletions
26
src/test/java/org/elasticsearch/index/query/date_range_in_boolean_cached_complex_now.json
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,26 @@ | ||
{ | ||
"constant_score": { | ||
"filter": { | ||
"bool": { | ||
"_cache" : true, | ||
"must": [ | ||
{ | ||
"term": { | ||
"foo": { | ||
"value": "bar" | ||
} | ||
} | ||
}, | ||
{ | ||
"range" : { | ||
"born" : { | ||
"gte": "2012-01-01", | ||
"lte": "now+1m+1s" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...org/elasticsearch/index/query/date_range_in_boolean_cached_complex_now_with_rounding.json
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,26 @@ | ||
{ | ||
"constant_score": { | ||
"filter": { | ||
"bool": { | ||
"_cache" : true, | ||
"must": [ | ||
{ | ||
"term": { | ||
"foo": { | ||
"value": "bar" | ||
} | ||
} | ||
}, | ||
{ | ||
"range" : { | ||
"born" : { | ||
"gte": "2012-01-01", | ||
"lte": "now+1m+1s/m" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...st/java/org/elasticsearch/index/query/date_range_in_boolean_cached_now_with_rounding.json
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,26 @@ | ||
{ | ||
"constant_score": { | ||
"filter": { | ||
"bool": { | ||
"_cache" : true, | ||
"must": [ | ||
{ | ||
"term": { | ||
"foo": { | ||
"value": "bar" | ||
} | ||
} | ||
}, | ||
{ | ||
"range" : { | ||
"born" : { | ||
"gte": "2012-01-01", | ||
"lte": "now/d" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
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