SongGuess
    Preparing search index...

    Class AiSearchItemsAbstract

    Items collection service for an AI Search instance. Provides list, upload, and access to individual items.

    Index

    Constructors

    Methods

    • Delete an item from the instance.

      Parameters

      • itemId: string

        The item identifier.

      Returns Promise<void>

    • Get an item by ID.

      Parameters

      • itemId: string

        The item identifier.

      Returns AiSearchItem

      Item service for info, download, sync, logs, and chunks operations.

    • Upload a file as an item. Behaves as an upsert: if an item with the same filename already exists, it is overwritten and re-indexed.

      Parameters

      • name: string

        Filename for the uploaded item.

      • content: string | ReadableStream<any> | Blob

        File content as a ReadableStream, Blob, or string.

      • Optionaloptions: AiSearchUploadItemOptions

        Optional metadata to attach to the item.

      Returns Promise<AiSearchItemInfo>

      The created item info.

    • Upload a file and poll until processing completes. Behaves as an upsert: if an item with the same filename already exists, it is overwritten and re-indexed.

      Parameters

      • name: string

        Filename for the uploaded item.

      • content: string | ReadableStream<any> | Blob

        File content as a ReadableStream, Blob, or string.

      • Optionaloptions: AiSearchUploadItemOptions & { pollIntervalMs?: number; timeoutMs?: number }

        Optional metadata and polling configuration.

        • OptionalpollIntervalMs?: number

          Polling interval in milliseconds (default 1000).

        • OptionaltimeoutMs?: number

          Maximum time to wait in milliseconds (default 30000).

      Returns Promise<AiSearchItemInfo>

      The item info after processing completes (or timeout).