This repository was archived by the owner on Jun 25, 2025. It is now read-only.
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;
107107 *
108108 * @param IndexUUID $indexUUID
109109 * @param Config $config
110+ * @param bool $forceReindex
110111 *
111112 * @throws ResourceNotAvailableException
112113 */
113114 public function configureIndex (
114115 IndexUUID $ indexUUID ,
115- Config $ config
116+ Config $ config ,
117+ bool $ forceReindex = false
116118 );
117119}
Original file line number Diff line number Diff line change @@ -120,17 +120,20 @@ public function checkIndex(IndexUUID $indexUUID): bool
120120 *
121121 * @param IndexUUID $indexUUID
122122 * @param Config $config
123+ * @param bool $forceReindex
123124 *
124125 * @throws ResourceNotAvailableException
125126 */
126127 public function configureIndex (
127128 IndexUUID $ indexUUID ,
128- Config $ config
129+ Config $ config ,
130+ bool $ forceReindex = false
129131 ) {
130132 $ this ->load ();
131133 parent ::configureIndex (
132134 $ indexUUID ,
133- $ config
135+ $ config ,
136+ $ forceReindex
134137 );
135138 $ this ->save ();
136139 }
Original file line number Diff line number Diff line change @@ -268,12 +268,14 @@ public function checkIndex(IndexUUID $indexUUID): bool
268268 *
269269 * @param IndexUUID $indexUUID
270270 * @param Config $config
271+ * @param bool $forceReindex
271272 *
272273 * @throws ResourceNotAvailableException
273274 */
274275 public function configureIndex (
275276 IndexUUID $ indexUUID ,
276- Config $ config
277+ Config $ config ,
278+ bool $ forceReindex = false
277279 ) {
278280 $ response = $ this
279281 ->httpClient
@@ -284,7 +286,9 @@ public function configureIndex(
284286 $ indexUUID ->composeUUID ()
285287 ),
286288 'post ' ,
287- [],
289+ [
290+ 'force_reindex ' => $ forceReindex
291+ ],
288292 $ config ->toArray (),
289293 Http::getApisearchHeaders ($ this )
290294 );
Original file line number Diff line number Diff line change @@ -141,12 +141,14 @@ public function checkIndex(IndexUUID $indexUUID): bool
141141 *
142142 * @param IndexUUID $indexUUID
143143 * @param Config $config
144+ * @param bool $forceReindex
144145 *
145146 * @throws ResourceNotAvailableException
146147 */
147148 public function configureIndex (
148149 IndexUUID $ indexUUID ,
149- Config $ config
150+ Config $ config ,
151+ bool $ forceReindex = false
150152 ) {
151153 if (!array_key_exists ($ this ->getIndexKey ($ indexUUID ), $ this ->indices )) {
152154 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
134134 *
135135 * @param IndexUUID $indexUUID
136136 * @param Config $config
137+ * @param bool $forceReindex
137138 *
138139 * @throws ResourceNotAvailableException
139140 */
140141 public function configureIndex (
141142 IndexUUID $ indexUUID ,
142- Config $ config
143+ Config $ config ,
144+ bool $ forceReindex = false
143145 ) {
144146 $ this ->throwMockException ();
145147 }
You can’t perform that action at this time.
0 commit comments