Skip to content

SearchOptions beta ​

Interface of @v12-engine/client/kit

ts
export interface SearchOptions<T>

What a search is made with: what it reads of each item, how far a typo may go, how many it gives back

Members ​

fuzzy ​

ts
fuzzy?: boolean;

Whether a typo finds (the fuzzy tier): yes when left out

keys ​

ts
keys: readonly (string | SearchKey<T>)[];

What the search reads of each item: property names, or keys with weights and getters

limit ​

ts
limit?: number;

How many hits at most, the best; every one when left out

threshold ​

ts
threshold?: number;

How far a word typed may be from a word found, as a share of its letters: 0.4 when left out (one letter wrong of four, two of five). 0 finds only what is typed. A word of fewer than four letters is always taken as typed