File tree Expand file tree Collapse file tree 6 files changed +38
-8
lines changed
core/src/main/java/org/elasticsearch/indices
docs/reference/migration/migrate_6_0
rest-api-spec/src/main/resources/rest-api-spec/test Expand file tree Collapse file tree 6 files changed +38
-8
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,6 @@ public IndexClosedException(StreamInput in) throws IOException{
42
42
43
43
@ Override
44
44
public RestStatus status () {
45
- return RestStatus .FORBIDDEN ;
45
+ return RestStatus .BAD_REQUEST ;
46
46
}
47
47
}
Original file line number Diff line number Diff line change @@ -107,8 +107,15 @@ $ curl -v -XPOST 'localhost:9200/my_index/_settings'
107
107
* Connection #0 to host localhost left intact
108
108
--------------------------------------------
109
109
110
- ==== Dissallow using `_cache` and `_cache_key`
110
+ ==== Disallow using `_cache` and `_cache_key`
111
111
112
112
The `_cache` and `_cache_key` options in queries have been deprecated since version 2.0.0 and
113
113
have been ignored since then, issuing a deprecation warning. These options have now been completely
114
114
removed, so using them now will throw an error.
115
+
116
+ ==== IndexClosedException to return 400 status code
117
+
118
+ An `IndexClosedException` is returned whenever an api that doesn't support
119
+ closed indices (e.g. search) is called passing closed indices as parameters
120
+ and `ignore_unavailable` is set to `false`. The response status code returned
121
+ in such case changed from `403` to `400`
Original file line number Diff line number Diff line change 86
86
---
87
87
" Test cat segments on closed index behaviour " :
88
88
89
+ - skip :
90
+ version : " - 5.99.99"
91
+ reason : status code on closed indices changed in 6.0.0 from 403 to 400
92
+
89
93
- do :
90
94
indices.create :
91
95
index : index1
99
103
index : index1
100
104
101
105
- do :
102
- catch : forbidden
106
+ catch : request
103
107
cat.segments :
104
108
index : index1
105
109
Original file line number Diff line number Diff line change 1
1
---
2
2
" Basic test for index open/close " :
3
+ - skip :
4
+ version : " - 5.99.99"
5
+ reason : status code on closed indices changed in 6.0.0 from 403 to 400
6
+
3
7
- do :
4
8
indices.create :
5
9
index : test_index
16
20
index : test_index
17
21
18
22
- do :
19
- catch : forbidden
23
+ catch : request
20
24
search :
21
25
index : test_index
22
26
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ setup:
23
23
24
24
---
25
25
" All indices " :
26
+ - skip :
27
+ version : " - 5.99.99"
28
+ reason : status code on closed indices changed in 6.0.0 from 403 to 400
29
+
26
30
- do :
27
31
indices.close :
28
32
index : _all
29
33
30
34
- do :
31
- catch : forbidden
35
+ catch : request
32
36
search :
33
37
index : test_index2
34
38
@@ -46,12 +50,16 @@ setup:
46
50
47
51
---
48
52
" Trailing wildcard " :
53
+ - skip :
54
+ version : " - 5.99.99"
55
+ reason : status code on closed indices changed in 6.0.0 from 403 to 400
56
+
49
57
- do :
50
58
indices.close :
51
59
index : test_*
52
60
53
61
- do :
54
- catch : forbidden
62
+ catch : request
55
63
search :
56
64
index : test_index2
57
65
@@ -69,12 +77,16 @@ setup:
69
77
70
78
---
71
79
" Only wildcard " :
80
+ - skip :
81
+ version : " - 5.99.99"
82
+ reason : status code on closed indices changed in 6.0.0 from 403 to 400
83
+
72
84
- do :
73
85
indices.close :
74
86
index : ' *'
75
87
76
88
- do :
77
- catch : forbidden
89
+ catch : request
78
90
search :
79
91
index : test_index3
80
92
Original file line number Diff line number Diff line change 43
43
44
44
---
45
45
" closed segments test " :
46
+ - skip :
47
+ version : " - 5.99.99"
48
+ reason : status code on closed indices changed in 6.0.0 from 403 to 400
46
49
47
50
- do :
48
51
indices.create :
63
66
index : index1
64
67
65
68
- do :
66
- catch : forbidden
69
+ catch : request
67
70
indices.segments :
68
71
index : index1
69
72
You can’t perform that action at this time.
0 commit comments