1
1
setup :
2
2
- skip :
3
- version : " - 8.5.99 "
4
- reason : awaits backports
3
+ version : " - 7.17.6 "
4
+ reason : fixed in 7.17.7
5
5
- do :
6
6
indices.create :
7
7
index : dates_year_only
@@ -16,14 +16,14 @@ setup:
16
16
bulk :
17
17
refresh : true
18
18
body :
19
- - ' { "index" : { "_index" : "dates_year_only", "_id" : "first " } }'
19
+ - ' { "index" : { "_index" : "dates_year_only", "_id" : "1 " } }'
20
20
- ' {"date" : "1900", "field" : 1 }'
21
- - ' { "index" : { "_index" : "dates_year_only", "_id" : "second" } }'
22
- - ' {"date" : "2022", "field" : 1 }'
23
- - ' { "index" : { "_index" : "dates_year_only", "_id" : "third" } }'
21
+ - ' { "index" : { "_index" : "dates_year_only", "_id" : "2" } }'
24
22
- ' {"date" : "2022", "field" : 2 }'
25
- - ' { "index" : { "_index" : "dates_year_only", "_id" : "fourth" } }'
26
- - ' {"date" : "1500", "field" : 2 }'
23
+ - ' { "index" : { "_index" : "dates_year_only", "_id" : "3" } }'
24
+ - ' {"date" : "2022", "field" : 3 }'
25
+ - ' { "index" : { "_index" : "dates_year_only", "_id" : "4" } }'
26
+ - ' {"date" : "1500", "field" : 4 }'
27
27
28
28
- do :
29
29
indices.create :
@@ -38,16 +38,16 @@ setup:
38
38
bulk :
39
39
refresh : true
40
40
body :
41
- - ' { "index" : { "_index" : "dates", "_id" : "first " } }'
41
+ - ' { "index" : { "_index" : "dates", "_id" : "1 " } }'
42
42
- ' {"date" : "1900-01-01T12:12:12.123456789Z", "field" : 1 }'
43
- - ' { "index" : { "_index" : "dates", "_id" : "second " } }'
44
- - ' {"date" : "2022-01-01T12:12:12.123456789Z", "field" : 1 }'
45
- - ' { "index" : { "_index" : "dates", "_id" : "third " } }'
46
- - ' {"date" : "2022-01-03T12:12:12.123456789Z", "field" : 2 }'
47
- - ' { "index" : { "_index" : "dates", "_id" : "fourth " } }'
48
- - ' {"date" : "1500-01-01T12:12:12.123456789Z", "field" : 2 }'
49
- - ' { "index" : { "_index" : "dates", "_id" : "fifth " } }'
50
- - ' {"date" : "1500-01-05T12:12:12.123456789Z", "field" : 2 }'
43
+ - ' { "index" : { "_index" : "dates", "_id" : "2 " } }'
44
+ - ' {"date" : "2022-01-01T12:12:12.123456789Z", "field" : 2 }'
45
+ - ' { "index" : { "_index" : "dates", "_id" : "3 " } }'
46
+ - ' {"date" : "2022-01-03T12:12:12.123456789Z", "field" : 3 }'
47
+ - ' { "index" : { "_index" : "dates", "_id" : "4 " } }'
48
+ - ' {"date" : "1500-01-01T12:12:12.123456789Z", "field" : 4 }'
49
+ - ' { "index" : { "_index" : "dates", "_id" : "5 " } }'
50
+ - ' {"date" : "1500-01-05T12:12:12.123456789Z", "field" : 5 }'
51
51
52
52
---
53
53
" test range query for all docs with year uuuu " :
56
56
rest_total_hits_as_int : true
57
57
index : dates
58
58
body :
59
+ sort : field
59
60
query :
60
61
range :
61
62
date :
73
74
rest_total_hits_as_int : true
74
75
index : dates
75
76
body :
77
+ sort : field
76
78
query :
77
79
range :
78
80
date :
82
84
83
85
- match : { hits.total: 1 }
84
86
- length : { hits.hits: 1 }
85
- - match : { hits.hits.0._id: "fourth " }
87
+ - match : { hits.hits.0._id: "4 " }
86
88
87
89
---
88
90
" test match query gte and lte with year uuuu " :
91
93
rest_total_hits_as_int : true
92
94
index : dates
93
95
body :
96
+ sort : field
94
97
query :
95
98
range :
96
99
date :
@@ -100,9 +103,9 @@ setup:
100
103
101
104
- match : { hits.total: 3 }
102
105
- length : { hits.hits: 3 }
103
- - match : { hits.hits.0._id: "first " }
104
- - match : { hits.hits.1._id: "fourth " }
105
- - match : { hits.hits.2._id: "fifth " }
106
+ - match : { hits.hits.0._id: "1 " }
107
+ - match : { hits.hits.1._id: "4 " }
108
+ - match : { hits.hits.2._id: "5 " }
106
109
107
110
---
108
111
" test match query with year uuuu " :
@@ -111,11 +114,12 @@ setup:
111
114
rest_total_hits_as_int : true
112
115
index : dates_year_only
113
116
body :
117
+ sort : field
114
118
query :
115
119
match :
116
120
date :
117
121
query : " 1500"
118
122
119
123
- match : { hits.total: 1 }
120
124
- length : { hits.hits: 1 }
121
- - match : { hits.hits.0._id: "fourth " }
125
+ - match : { hits.hits.0._id: "4 " }
0 commit comments