Array of manga match results to search.
Configured Fuse instance with extended search enabled.
export function createMangaFuseInstance(
matches: MangaMatchResult[],
): Fuse<MangaMatchResult> {
return buildFuse(
matches,
[
{ name: "kenmeiManga.title", weight: 0.5 },
{ name: "selectedMatch.title.romaji", weight: 0.3 },
{ name: "selectedMatch.title.english", weight: 0.3 },
{ name: "selectedMatch.synonyms", weight: 0.1 },
],
{
useExtendedSearch: true, // Enable extended search syntax support for query parsing
},
);
}
Creates a configured Fuse.js instance for manga search.
Searches across multiple title fields with weighted priorities:
Important: This function explicitly enables
useExtendedSearchfor fuzzy query syntax support (e.g., 'foo bar' searches for both terms). Callers should be aware that search results will respect this extended syntax behavior.