Skip to content

Commit 93491c2

Browse files
committed
Clarify docs
1 parent 4bea4ce commit 93491c2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ client.search('keyword', cb);
4343
## Search API
4444

4545
The client provides following functions to execute search queries. To use the client library for indexing,
46-
see [Indexing API](https://github.com/AddSearch/js-client-library#indexing-api) section.
46+
see [Indexing API](https://github.com/AddSearch/js-client-library#indexing-api).
4747

4848
#### Fetch search results
4949
```js
@@ -302,7 +302,7 @@ client.setJWT(token);
302302

303303
#### Set API throttling
304304
```js
305-
// Set API call throttle time in milliseconds. Default is 200.
305+
// Set Search API throttle time in milliseconds. Default is 200.
306306
client.setThrottleTime(500);
307307
```
308308

@@ -321,7 +321,7 @@ var client = new AddSearchClient('YOUR PUBLIC SITEKEY', 'YOUR SECRET KEY');
321321
The secret key can be found from AddSearch Dashboard's "Setup" > "Keys and installation" page.
322322
Always keep the key secret.
323323

324-
Indexing API functions return promises.
324+
All Indexing API functions are Promise-based.
325325

326326

327327
### Document ID
@@ -330,21 +330,21 @@ Document ID can be defined by the user, or it can be autogenerated when a docume
330330

331331
```js
332332
// ID defined by the user
333-
const doc = {
333+
const docWithDefinedId = {
334334
id: '1234',
335-
...
335+
custom_fields: {}
336336
}
337337

338338
// ID created from the URL field (md5 sum)
339-
const doc = {
339+
const docWithURL= {
340340
url: 'https://..', // id will be md5('https://..')
341-
...
341+
custom_fields: {}
342342
}
343343

344344
// ID will be generated automatically
345-
const doc = {
345+
const docWithAutogeneratedId = {
346346
// No id or url fields
347-
...
347+
custom_fields: {}
348348
}
349349
```
350350

0 commit comments

Comments
 (0)