Skip to content

Commit 2dd1bd0

Browse files
committed
Improve docs
1 parent b1a07af commit 2dd1bd0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# AddSearch Search API Client for JavaScript
22

3-
[AddSearch](https://www.addsearch.com) is a hosted search platform for all your web content. This API
4-
Client lets you easily use the [AddSearch Search API](https://www.addsearch.com/support/api-reference/)
5-
from your JavaScript code on web browsers or with Node.js.
3+
[AddSearch](https://www.addsearch.com) is a Search-as-a-Service for all your search needs. This API
4+
Client lets you easily use the [AddSearch Search API](https://www.addsearch.com/docs/api/)
5+
with JavaScript on web browsers or from Node.js.
66

77
## Quick Start
8-
The library is available on the global CDN [jsDelivr:](https://www.jsdelivr.com/)
8+
The library is available on the global CDN [jsDelivr:](https://www.jsdelivr.com/package/npm/addsearch-js-client)
99
```html
1010
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/addsearch-js-client.min.js"></script>
1111
```
12-
To install the library locally or to use it with Node.js:
12+
Or install the library locally to use it with Node.js:
1313
```sh
1414
npm install addsearch-js-client --save
1515
```
@@ -212,7 +212,8 @@ client.setNumberOfFacets(20);
212212
#### Numerical range facets
213213
Group numerical custom fields into range buckets.
214214
```js
215-
// Define ranges. E.g. products with price $0-$100, $100-$200, and over $200 (from value is inclusive, to value is exclusive)
215+
// Define ranges. E.g. products with price $0-$100, $100-$200, and over $200.
216+
// From value is inclusive, to value is exclusive
216217
var ranges = [
217218
{'to': 100},
218219
{'from': 100, 'to': 200},
@@ -224,10 +225,11 @@ client.addRangeFacet('custom_fields.price', ranges);
224225
```
225226

226227
### Field statistics
227-
Get the minimum, maximum, and average values of a numerical or date-based custom field. The information
228+
Get minimum, maximum, and average values of a numerical or date-based custom field. The information
228229
is handy for applications like range filtering.
229230
```js
230-
// Search response will have fieldStats element with information like {min: 1230, max: 1590, avg: 1382}
231+
// Search response will have a fieldStats element with information like
232+
// custom_fields.price: {min: 1230, max: 1590, avg: 1382}
231233
client.addStatsField('custom_fields.price');
232234
```
233235

0 commit comments

Comments
 (0)