Skip to content

Commit e3b429b

Browse files
committed
Add custom field autocomplete documentation
1 parent e22b3e1 commit e3b429b

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
@@ -57,18 +57,33 @@ client.search();
5757
```
5858

5959
#### Fetch search suggestions
60+
Search suggestions are keywords and search phrases that real users have used in your search. Configure Search
61+
suggestions on AddSearch Dashboard before using this function.
6062
```js
61-
// Configure Search suggestions on AddSearch Dashboard first
6263
// Get suggestions starting with a specific prefix
6364
client.suggestions('a', callback);
6465
```
6566

66-
#### Number of search suggestions
67+
#### Set the number of search suggestions to fetch
6768
```js
6869
// Number of search suggestions to fetch (default 10)
6970
client.setSuggestionsSize(20);
7071
```
7172

73+
#### Fetch custom field autocompletion
74+
Custom fields autocomplete can be used for predictive search. For example, product names or categories can be
75+
suggested as the keyword is being typed in.
76+
```js
77+
// Fetch custom field values starting with a specific prefix. In this example, results could be "adidas, apple, azure"
78+
client.autocomplete('custom_fields.brand', 'a', callback);
79+
```
80+
81+
#### Set the number of custom field autocompletion results to fetch
82+
```js
83+
// Number of autocompletion results to fetch (default 10)
84+
client.setAutocompleteSize(20);
85+
```
86+
7287
#### Search with fuzzy matching
7388
```js
7489
// Enable/disable fuzzy matching. Possible values true/false/"auto" (default: "auto")

0 commit comments

Comments
 (0)