Skip to content

Commit 2d84a5a

Browse files
committed
Add instructions for price range filter and setting user token
1 parent f83d69c commit 2d84a5a

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ The client provides the following functions.
4141
// Search with a specific keyword
4242
client.search('keyword', callback);
4343

44+
// Match all query
45+
client.search('*', callback);
46+
4447
// Search with the previously used keyword or execute a "match all" query
4548
client.search(callback);
4649
```
@@ -60,22 +63,34 @@ client.useFuzzyMatch(false);
6063

6164
#### Set JSON Web Token (for authentication)
6265
```js
63-
// Add JWT to the HTTPS request (if protected search index)
66+
// Add JWT to the search request (if protected search index)
6467
client.setJWT(token);
6568
```
6669

70+
#### Set user token (for personalized search results)
71+
```js
72+
// Add a user token to the search request (if personalization in use)
73+
client.setUserToken('uuid');
74+
```
75+
6776
#### Define language filter
6877
```js
6978
// Documents in specific language (e.g. "en" or "de")
7079
client.setLanguage('en');
7180
```
7281

73-
#### Define publishing date filters
82+
#### Define publishing date filter
7483
```js
7584
// Documents published between specific date range
7685
client.setDateFilter('2019-01-01', '2019-01-31');
7786
```
7887

88+
#### Define price range filter
89+
```js
90+
// Products in specific price range (in cents. e.g. 100,00 - 200,00)
91+
client.setPriceRangeFilter('10000', '20000');
92+
```
93+
7994
#### Define category filters
8095
Filter by URL patterns, document types or *addsearch-category* meta tag values.
8196
See the [full documentation.](https://www.addsearch.com/support/documentation/ranking-relevance-filters/filters/#category-filters)

0 commit comments

Comments
 (0)