• Creates a configured Fuse.js instance for manga search.

    Searches across multiple title fields with weighted priorities:

    • Kenmei title (50%)
    • Romaji title (30%)
    • English title (30%)
    • Synonyms (10%)

    Important: This function explicitly enables useExtendedSearch for 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.

    Parameters

    Returns Fuse<MangaMatchResult>

    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
    },
    );
    }