You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let (data, response) =tryawait client.stopword("stopword_set1").delete()
188
316
```
189
317
318
+
### Create or update a synonym
319
+
320
+
```swift
321
+
let schema =SearchSynonymSchema(synonyms: ["blazer", "coat", "jacket"])
322
+
let (data, response) =tryawait client.collection(name: "products").synonyms().upsert(id: "coat-synonyms", schema)
323
+
```
324
+
325
+
### Retrieve all synonyms
326
+
327
+
```swift
328
+
let (data, response) =tryawait client.collection(name: "products").synonyms().retrieve()
329
+
```
330
+
331
+
### Retrieve a synonym
332
+
333
+
```swift
334
+
let (data, response) =tryawait client.collection(name: "products").synonyms().retrieve(id: "coat-synonyms")
335
+
```
336
+
337
+
### Delete a synonym
338
+
339
+
```swift
340
+
let (data, response) =tryawait myClient.collection(name: "products").synonyms().delete(id: "coat-synonyms")
341
+
```
342
+
190
343
### Retrieve debug information
191
344
192
345
```swift
193
346
let (data, response) =tryawait client.operations().getDebug()
194
347
```
195
348
349
+
### Retrieve health status
350
+
351
+
```swift
352
+
let (data, response) =tryawait client.operations().getHealth()
353
+
```
354
+
355
+
### Retrieve API stats
356
+
357
+
```swift
358
+
let (data, response) =tryawait client.operations().getStats()
359
+
```
360
+
361
+
### Retrieve Cluster Metrics
362
+
363
+
```swift
364
+
let (data, response) =tryawait client.operations().getMetrics()
365
+
```
366
+
367
+
### Re-elect Leader
368
+
369
+
```swift
370
+
let (data, response) =tryawait client.operations().vote()
371
+
```
372
+
373
+
### Toggle Slow Request Log
374
+
375
+
```swift
376
+
let (data, response) =tryawait client.operations().toggleSlowRequestLog(seconds: 2)
377
+
```
378
+
379
+
### Clear cache
380
+
381
+
```swift
382
+
let (data, response) =tryawait client.operations().clearCache()
383
+
```
384
+
385
+
### Create Snapshot (for backups)
386
+
387
+
```swift
388
+
let (data, response) =tryawait client.operations().snapshot(path: "/tmp/typesense-data-snapshot")
389
+
```
390
+
196
391
## Contributing
197
392
198
393
Issues and pull requests are welcome on GitHub at [Typesense Swift](https://github.com/typesense/typesense-swift). Do note that the Models used in the Swift client are generated by [Swagger-Codegen](https://github.com/swagger-api/swagger-codegen) and are automated to be modified in order to prevent major errors. So please do use the shell script that is provided in the repo to generate the models:
@@ -205,5 +400,4 @@ The generated Models (inside the Models directory) are to be used inside the Mod
0 commit comments