Options for the search function.
| Property |
Type |
Description |
includePositions? |
boolean |
If true, include matched character positions in results. |
isCaseSensitive? |
boolean |
If true, matching is case-sensitive. When false or omitted, matching is smart case: case-insensitive while the query is all lower-case, and case-sensitive once it contains an upper-case letter. false does not force case-insensitive matching; lower-case the query for that. |
maxResults? |
number |
Maximum number of results to return: a non-negative integer, or Infinity for no limit. NaN, negative and fractional values throw. |
minScore? |
number |
Minimum normalized score (0.0-1.0) to include in results. NaN throws. |
returnAllOnEmpty? |
boolean |
If true, return all items when the query has no search term: empty, whitespace-only, or only query syntax such as ^ or !. They come in index order, each with score 1 (maxResults then keeps the first ones). Useful for filter-as-you-type UIs where the full list should appear before the user starts typing. Default is false. |