File tree Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,13 @@ public function checkIndex(IndexUUID $indexUUID): bool;
107
107
*
108
108
* @param IndexUUID $indexUUID
109
109
* @param Config $config
110
+ * @param bool $forceReindex
110
111
*
111
112
* @throws ResourceNotAvailableException
112
113
*/
113
114
public function configureIndex (
114
115
IndexUUID $ indexUUID ,
115
- Config $ config
116
+ Config $ config ,
117
+ bool $ forceReindex = false
116
118
);
117
119
}
Original file line number Diff line number Diff line change @@ -120,17 +120,20 @@ public function checkIndex(IndexUUID $indexUUID): bool
120
120
*
121
121
* @param IndexUUID $indexUUID
122
122
* @param Config $config
123
+ * @param bool $forceReindex
123
124
*
124
125
* @throws ResourceNotAvailableException
125
126
*/
126
127
public function configureIndex (
127
128
IndexUUID $ indexUUID ,
128
- Config $ config
129
+ Config $ config ,
130
+ bool $ forceReindex = false
129
131
) {
130
132
$ this ->load ();
131
133
parent ::configureIndex (
132
134
$ indexUUID ,
133
- $ config
135
+ $ config ,
136
+ $ forceReindex
134
137
);
135
138
$ this ->save ();
136
139
}
Original file line number Diff line number Diff line change @@ -268,12 +268,14 @@ public function checkIndex(IndexUUID $indexUUID): bool
268
268
*
269
269
* @param IndexUUID $indexUUID
270
270
* @param Config $config
271
+ * @param bool $forceReindex
271
272
*
272
273
* @throws ResourceNotAvailableException
273
274
*/
274
275
public function configureIndex (
275
276
IndexUUID $ indexUUID ,
276
- Config $ config
277
+ Config $ config ,
278
+ bool $ forceReindex = false
277
279
) {
278
280
$ response = $ this
279
281
->httpClient
@@ -284,7 +286,9 @@ public function configureIndex(
284
286
$ indexUUID ->composeUUID ()
285
287
),
286
288
'post ' ,
287
- [],
289
+ [
290
+ 'force_reindex ' => $ forceReindex
291
+ ],
288
292
$ config ->toArray (),
289
293
Http::getApisearchHeaders ($ this )
290
294
);
Original file line number Diff line number Diff line change @@ -141,12 +141,14 @@ public function checkIndex(IndexUUID $indexUUID): bool
141
141
*
142
142
* @param IndexUUID $indexUUID
143
143
* @param Config $config
144
+ * @param bool $forceReindex
144
145
*
145
146
* @throws ResourceNotAvailableException
146
147
*/
147
148
public function configureIndex (
148
149
IndexUUID $ indexUUID ,
149
- Config $ config
150
+ Config $ config ,
151
+ bool $ forceReindex = false
150
152
) {
151
153
if (!array_key_exists ($ this ->getIndexKey ($ indexUUID ), $ this ->indices )) {
152
154
throw ResourceNotAvailableException::indexNotAvailable ('Index not available in InMemoryRepository ' );
Original file line number Diff line number Diff line change @@ -134,12 +134,14 @@ public function checkIndex(IndexUUID $indexUUID): bool
134
134
*
135
135
* @param IndexUUID $indexUUID
136
136
* @param Config $config
137
+ * @param bool $forceReindex
137
138
*
138
139
* @throws ResourceNotAvailableException
139
140
*/
140
141
public function configureIndex (
141
142
IndexUUID $ indexUUID ,
142
- Config $ config
143
+ Config $ config ,
144
+ bool $ forceReindex = false
143
145
) {
144
146
$ this ->throwMockException ();
145
147
}
You can’t perform that action at this time.
0 commit comments