@@ -67,7 +67,7 @@ public function listIndexes(?int $storeId = null)
67
67
*/
68
68
public function query (string $ indexName , string $ q , array $ params , ?int $ storeId = null ): array
69
69
{
70
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
70
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
71
71
72
72
return $ this ->algoliaConnector ->query ($ indexOptions , $ q , $ params );
73
73
}
@@ -77,11 +77,11 @@ public function query(string $indexName, string $q, array $params, ?int $storeId
77
77
* @param array $objectIds
78
78
* @param int|null $storeId
79
79
* @return array<string, mixed>
80
- * @throws AlgoliaException
80
+ * @throws AlgoliaException|NoSuchEntityException
81
81
*/
82
82
public function getObjects (string $ indexName , array $ objectIds , ?int $ storeId = null ): array
83
83
{
84
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
84
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
85
85
86
86
return $ this ->algoliaConnector ->getObjects ($ indexOptions , $ objectIds );
87
87
}
@@ -103,7 +103,7 @@ public function setSettings(
103
103
string $ mergeSettingsFrom = '' ,
104
104
?int $ storeId = null
105
105
) {
106
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
106
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
107
107
108
108
$ this ->algoliaConnector ->setSettings (
109
109
$ indexOptions ,
@@ -122,7 +122,7 @@ public function setSettings(
122
122
*/
123
123
public function deleteIndex (string $ indexName , ?int $ storeId = null ): void
124
124
{
125
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
125
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
126
126
127
127
$ this ->algoliaConnector ->deleteIndex ($ indexOptions );
128
128
}
@@ -136,7 +136,7 @@ public function deleteIndex(string $indexName, ?int $storeId = null): void
136
136
*/
137
137
public function deleteObjects (array $ ids , string $ indexName , ?int $ storeId = null ): void
138
138
{
139
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
139
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
140
140
141
141
$ this ->algoliaConnector ->deleteObjects ($ ids , $ indexOptions );
142
142
}
@@ -150,8 +150,8 @@ public function deleteObjects(array $ids, string $indexName, ?int $storeId = nul
150
150
*/
151
151
public function moveIndex (string $ fromIndexName , string $ toIndexName , ?int $ storeId = null ): void
152
152
{
153
- $ fromIndexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ fromIndexName , $ storeId );
154
- $ toIndexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ toIndexName , $ storeId );
153
+ $ fromIndexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ fromIndexName , $ storeId );
154
+ $ toIndexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ toIndexName , $ storeId );
155
155
156
156
$ this ->algoliaConnector ->moveIndex ($ fromIndexOptions , $ toIndexOptions );
157
157
}
@@ -176,7 +176,7 @@ public function generateSearchSecuredApiKey(string $key, array $params = [], ?in
176
176
*/
177
177
public function getSettings (string $ indexName , ?int $ storeId = null ): array
178
178
{
179
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
179
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
180
180
181
181
return $ this ->algoliaConnector ->getSettings ($ indexOptions );
182
182
}
@@ -192,7 +192,7 @@ public function getSettings(string $indexName, ?int $storeId = null): array
192
192
*/
193
193
public function saveObjects (string $ indexName , array $ objects , bool $ isPartialUpdate = false , ?int $ storeId = null ): void
194
194
{
195
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
195
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
196
196
197
197
$ this ->algoliaConnector ->saveObjects ($ indexOptions , $ objects , $ isPartialUpdate );
198
198
}
@@ -207,7 +207,7 @@ public function saveObjects(string $indexName, array $objects, bool $isPartialUp
207
207
*/
208
208
public function saveRule (array $ rule , string $ indexName , bool $ forwardToReplicas = false , ?int $ storeId = null ): void
209
209
{
210
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
210
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
211
211
212
212
$ this ->algoliaConnector ->saveRule ($ rule , $ indexOptions , $ forwardToReplicas );
213
213
}
@@ -223,7 +223,7 @@ public function saveRule(array $rule, string $indexName, bool $forwardToReplicas
223
223
*/
224
224
public function saveRules (string $ indexName , array $ rules , bool $ forwardToReplicas = false , ?int $ storeId = null ): void
225
225
{
226
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
226
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
227
227
228
228
$ this ->algoliaConnector ->saveRules ($ indexOptions , $ rules , $ forwardToReplicas );
229
229
}
@@ -243,7 +243,7 @@ public function deleteRule(
243
243
?int $ storeId = null
244
244
) : void
245
245
{
246
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
246
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
247
247
248
248
$ this ->algoliaConnector ->deleteRule ($ indexOptions , $ objectID , $ forwardToReplicas );
249
249
}
@@ -258,8 +258,8 @@ public function deleteRule(
258
258
*/
259
259
public function copySynonyms (string $ fromIndexName , string $ toIndexName , ?int $ storeId = null ): void
260
260
{
261
- $ fromIndexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ fromIndexName , $ storeId );
262
- $ toIndexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ toIndexName , $ storeId );
261
+ $ fromIndexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ fromIndexName , $ storeId );
262
+ $ toIndexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ toIndexName , $ storeId );
263
263
264
264
$ this ->algoliaConnector ->copySynonyms ($ fromIndexOptions , $ toIndexOptions );
265
265
}
@@ -274,8 +274,8 @@ public function copySynonyms(string $fromIndexName, string $toIndexName, ?int $s
274
274
*/
275
275
public function copyQueryRules (string $ fromIndexName , string $ toIndexName , ?int $ storeId = null ): void
276
276
{
277
- $ fromIndexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ fromIndexName , $ storeId );
278
- $ toIndexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ toIndexName , $ storeId );
277
+ $ fromIndexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ fromIndexName , $ storeId );
278
+ $ toIndexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ toIndexName , $ storeId );
279
279
280
280
$ this ->algoliaConnector ->copyQueryRules ($ fromIndexOptions , $ toIndexOptions );
281
281
}
@@ -290,7 +290,7 @@ public function copyQueryRules(string $fromIndexName, string $toIndexName, ?int
290
290
*/
291
291
public function searchRules (string $ indexName , array $ searchRulesParams = null , ?int $ storeId = null )
292
292
{
293
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
293
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
294
294
295
295
return $ this ->algoliaConnector ->searchRules ($ indexOptions , $ searchRulesParams );
296
296
}
@@ -303,7 +303,7 @@ public function searchRules(string $indexName, array $searchRulesParams = null,
303
303
*/
304
304
public function clearIndex (string $ indexName , ?int $ storeId = null ): void
305
305
{
306
- $ indexOptions = $ this ->indexOptionsBuilder ->convertToIndexOptions ($ indexName , $ storeId );
306
+ $ indexOptions = $ this ->indexOptionsBuilder ->buildWithEnforcedIndex ($ indexName , $ storeId );
307
307
308
308
$ this ->algoliaConnector ->clearIndex ($ indexOptions );
309
309
}
0 commit comments