@logseq/libs
    Preparing search index...

    Interface IPluginSearchServiceHooks

    interface IPluginSearchServiceHooks {
        name: string;
        onBlocksChanged: (
            graph: string,
            changes: { added: SearchBlockItem[]; removed: number[] },
        ) => Promise<void>;
        onGraphRemoved: (graph: string, opts?: {}) => Promise<any>;
        onIndiceInit: (graph: string) => Promise<boolean>;
        onIndiceReset: (graph: string) => Promise<void>;
        onQuery: (
            graph: string,
            key: string,
            opts: Partial<{ limit: number }>,
        ) => Promise<
            {
                blocks?: Partial<SearchBlockItem>[];
                files?: string[];
                graph: string;
                key: string;
                pages?: string[];
            },
        >;
        options?: Record<string, any>;
    }
    Index

    Properties

    name: string
    onBlocksChanged: (
        graph: string,
        changes: { added: SearchBlockItem[]; removed: number[] },
    ) => Promise<void>
    onGraphRemoved: (graph: string, opts?: {}) => Promise<any>
    onIndiceInit: (graph: string) => Promise<boolean>
    onIndiceReset: (graph: string) => Promise<void>
    onQuery: (
        graph: string,
        key: string,
        opts: Partial<{ limit: number }>,
    ) => Promise<
        {
            blocks?: Partial<SearchBlockItem>[];
            files?: string[];
            graph: string;
            key: string;
            pages?: string[];
        },
    >
    options?: Record<string, any>