Skip to content

Commit 373eaa1

Browse files
committed
update description, remove "empty parameter" logic
1 parent 399d1a6 commit 373eaa1

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,6 @@ client.autocomplete('custom_fields.brand', 'a', callback);
8686
client.setAutocompleteSize(20);
8787
```
8888

89-
#### Search operator
90-
Description for search operator. There are three options:
91-
- **"and"**:
92-
- **"or"**:
93-
- **no parameter**: Remove the query parameter from the search api
94-
95-
```js
96-
// Possible values "and"/"or"/null/ (default: null)
97-
client.setSearchOperator('and');
98-
```
99-
10089
#### Search with fuzzy matching
10190
Fuzzy matching is used for typo tolerance. There are four options:
10291
- **false**: No typo tolerance
@@ -110,6 +99,18 @@ Fuzzy matching is used for typo tolerance. There are four options:
11099
client.setFuzzyMatch(false);
111100
```
112101

102+
#### Search operator
103+
When a user searches with multiple keywords, we return only documents that contain all the terms which means
104+
applying the logical operator AND for the query. It is possible to choose which logical operator to use for
105+
fuzzy results when the fuzzy parameter is set to auto. There are two options:
106+
- **"or"**: makes fuzzy results broader and includes partial matches of a few search terms
107+
- **"and"**: makes fuzzy results stricter and includes only mistyped search terms
108+
109+
```js
110+
// Possible values "and"/"or" (default: "or")
111+
client.setSearchOperator('and');
112+
```
113+
113114
#### Postfix wildcard
114115
Enable or disable postfix wildcard. I.e. should keyword "add" match to "addsearch" or should it just match to the
115116
term **add**

0 commit comments

Comments
 (0)