Member Junction
    Preparing search index...

    Type Alias FileSearchResult

    Represents a single search result from a file storage provider. Combines file metadata with search-specific information like relevance and excerpts.

    type FileSearchResult = {
        contentType: string;
        customMetadata?: Record<string, string>;
        excerpt?: string;
        lastModified: Date;
        matchInFilename?: boolean;
        name: string;
        objectId?: string;
        path: string;
        providerData?: Record<string, unknown>;
        relevance?: number;
        size: number;
    }
    Index

    Properties

    contentType: string

    MIME type of the file.

    customMetadata?: Record<string, string>

    Custom metadata associated with the file.

    excerpt?: string

    Text excerpt showing the search term in context (for content searches). May contain HTML highlighting tags from the provider. Undefined if content search was not performed or no match in content.

    lastModified: Date

    When the file was last modified.

    matchInFilename?: boolean

    Whether the match was found in the filename (true) or content (false). Undefined if this information is not available from the provider.

    name: string

    Filename without the directory path.

    objectId?: string

    Provider-specific object ID that can be used for direct access. This ID can be passed to GetObject/GetMetadata to bypass path resolution. Examples: Box file ID, Google Drive file ID, SharePoint item ID, Dropbox id. Provides significant performance improvement by avoiding path traversal.

    path: string

    Full path to the file including directory and filename.

    providerData?: Record<string, unknown>

    Provider-specific additional data. Example: Google Drive file ID, SharePoint list item ID, etc.

    relevance?: number

    Relevance score from the search provider (0.0 to 1.0). Higher scores indicate better matches. May be undefined if provider doesn't return relevance scores.

    size: number

    File size in bytes.