Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 8ea47f0

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 f14723b commit 8ea47f0

File tree

1 file changed

+38
-9
lines changed

1 file changed

+38
-9
lines changed

README.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ Manage Indices
6565
1. [Copy index](#copy-index---copyindexasync)
6666
1. [Move index](#move-index---moveindexasync)
6767

68-
Api Keys
69-
70-
1. [Generate key](#generate-key)
7168

7269

7370

@@ -78,12 +75,6 @@ Advanced
7875
1. [Multiple queries](#multiple-queries---multiplequeriesasync)
7976
1. [Delete by query](#delete-by-query---deletebyqueryasync)
8077
1. [Backup / Export an index](#backup--export-an-index---browseasync)
81-
1. [List api keys](#list-api-keys)
82-
1. [Add user key](#add-user-key)
83-
1. [Update user key](#update-user-key)
84-
1. [Delete user key](#delete-user-key)
85-
1. [Get key permissions](#get-key-permissions)
86-
1. [Get Logs](#get-logs)
8778

8879

8980

@@ -403,6 +394,9 @@ index.enableSearchCache(300, 20);
403394

404395
## Indexing
405396

397+
*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.*
398+
399+
406400
### Add objects - `addObjectsAsync`
407401

408402
Each entry in an index has a unique identifier called `objectID`. There are two ways to add an entry to the index:
@@ -576,6 +570,9 @@ the biggest `taskID`.
576570
577571
## Settings
578572
573+
*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.*
574+
575+
579576
### Get settings - `getSettingsAsync`
580577
581578
You can retrieve settings:
@@ -1601,6 +1598,9 @@ For example:
16011598

16021599
## Manage Indices
16031600

1601+
*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.*
1602+
1603+
16041604
### Create an index
16051605

16061606
To create an index, you need to perform any indexing operation like:
@@ -1758,6 +1758,35 @@ iterator.start();
17581758
```
17591759

17601760

1761+
### Multiple queries - `multipleQueriesAsync`
1762+
1763+
You can send multiple queries with a single API call using a batch of queries:
1764+
1765+
```java
1766+
// perform 3 queries in a single API call:
1767+
// - 1st query targets index `categories`
1768+
// - 2nd and 3rd queries target index `products`
1769+
1770+
List<IndexQuery> queries = new ArrayList<>();
1771+
1772+
queries.add(new IndexQuery("categories", new Query(myQueryString).setHitsPerPage(3)));
1773+
queries.add(new IndexQuery("products", new Query(myQueryString).setHitsPerPage(3).set("filters", "_tags:promotion"));
1774+
queries.add(new IndexQuery("products", new Query(myQueryString).setHitsPerPage(10)));
1775+
1776+
client.multipleQueriesAsync(queries, new CompletionHandler() {
1777+
@Override
1778+
public void requestCompleted(JSONObject content, AlgoliaException error) {
1779+
// [...]
1780+
}
1781+
});
1782+
```
1783+
1784+
The resulting JSON answer contains a ```results``` array storing the underlying queries answers. The answers order is the same than the requests order.
1785+
1786+
You can specify a `strategy` parameter to optimize your multiple queries:
1787+
- `none`: Execute the sequence of queries until the end.
1788+
- `stopIfEnoughMatches`: Execute the sequence of queries until the number of hits is reached by the sum of hits.
1789+
17611790

17621791
### REST API
17631792

0 commit comments

Comments
 (0)