Skip to content

Commit

Permalink
docs: add description of the query parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
m31coding committed Feb 17, 2024
1 parent 580e8ce commit 3da3db8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ console.dir(result2);
} */
```

The following parameters are available when creating a query:

| Parameter | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| string | string | - | The query string. |
| topN | number | 10 | The maximum number of matches to return. Provide Infinity to return all matches. |
| minQuality | number | 0.3 | The minimum quality of a match, ranging from 0 to 1. When set to zero, all terms that share at least one common n-gram with the query are considered a match. |

If the data terms contain characters and strings in non-latin scripts (such as Arabic, Cyrillic, Greek, Han, ... see also [ISO 15924](https://en.wikipedia.org/wiki/ISO_15924)), the default configuration must be adjusted before creating the searcher:

```js
Expand Down

0 comments on commit 3da3db8

Please sign in to comment.