Skip to content

Commit a54419f

Browse files
docs(README): automatic update
docs(android, swift): Add warning about write operations Write operations are still documented, but the user is warned that she should consider updating indices from the back-end, rather than the front-end. [This list might not be relevant] docs(android, swift): Add warning about write operations Write operations are still documented, but the user is warned that she should consider updating indices from the back-end, rather than the front-end. docs(android, swift): Fix hidden sections - Admin key-only operations are not available => hide them from the TOC. - Multiple queries *are* available => restore them. [ci skip]
1 parent 5e2d5f7 commit a54419f

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ Manage Indices
7878
1. [Copy index](#copy-index---copyindex)
7979
1. [Move index](#move-index---moveindex)
8080

81-
Api Keys
82-
83-
1. [Generate key](#generate-key---generatesecuredapikey)
8481

8582

8683

@@ -91,12 +88,6 @@ Advanced
9188
1. [Multiple queries](#multiple-queries---multiplequeries)
9289
1. [Delete by query](#delete-by-query---deletebyquery)
9390
1. [Backup / Export an index](#backup--export-an-index---browse)
94-
1. [List api keys](#list-api-keys---listapikeys)
95-
1. [Add user key](#add-user-key---adduserkey)
96-
1. [Update user key](#update-user-key---updateuserkey)
97-
1. [Delete user key](#delete-user-key---deleteuserkey)
98-
1. [Get key permissions](#get-key-permissions---getuserkeyacl)
99-
1. [Get Logs](#get-logs---getlogs)
10091

10192

10293

@@ -424,6 +415,9 @@ index.enableSearchCache(expiringTimeInterval: 300)
424415

425416
## Indexing
426417

418+
*Note: In most use cases, updating indices is better done from your back-end. Methods in this section are documented for the sake of completeness.*
419+
420+
427421
### Add objects - `addObjects`
428422

429423
Each entry in an index has a unique identifier called `objectID`. There are two ways to add an entry to the index:
@@ -615,6 +609,9 @@ the biggest `taskID`.
615609

616610
## Settings
617611

612+
*Note: In most use cases, updating indices is better done from your back-end. Methods in this section are documented for the sake of completeness.*
613+
614+
618615
### Get settings - `getSettings`
619616

620617
You can retrieve settings:
@@ -1642,6 +1639,9 @@ For example:
16421639
16431640
## Manage Indices
16441641
1642+
*Note: In most use cases, updating indices is better done from your back-end. Methods in this section are documented for the sake of completeness.*
1643+
1644+
16451645
### Create an index
16461646
16471647
To create an index, you need to perform any indexing operation like:
@@ -1780,6 +1780,32 @@ iterator.start()
17801780
```
17811781
17821782
1783+
### Multiple queries - `multipleQueries`
1784+
1785+
You can send multiple queries with a single API call using a batch of queries:
1786+
1787+
```swift
1788+
// Perform 3 queries in a single API call:
1789+
// - 1st query target index `categories`
1790+
// - 2nd and 3rd queries target index `products`
1791+
let queries = [
1792+
IndexQuery(indexName: "categories", query: Query(query: "electronics")),
1793+
IndexQuery(indexName: "products", query: Query(query: "iPhone")),
1794+
IndexQuery(indexName: "products", query: Query(query: "Galaxy"))
1795+
]
1796+
client.multipleQueries(queries, completionHandler: { (content, error) -> Void in
1797+
if error == nil {
1798+
print("Result: \(content!)")
1799+
}
1800+
})
1801+
```
1802+
1803+
The resulting JSON answer contains a ```results``` array storing the underlying queries answers. The answers order is the same than the requests order.
1804+
1805+
You can specify a `strategy` parameter to optimize your multiple queries:
1806+
- `none`: Execute the sequence of queries until the end.
1807+
- `stopIfEnoughMatches`: Execute the sequence of queries until the number of hits is reached by the sum of hits.
1808+
17831809
17841810
### REST API
17851811

0 commit comments

Comments
 (0)