Represents a search result item with relevance score. Extends the base Item interface with an optional similarity score.

interface SearchItem {
    createdAt: Date;
    key: string;
    namespace: string[];
    score?: number;
    updatedAt: Date;
    value: Record<string, any>;
}

Hierarchy (view full)

Properties

createdAt: Date

Timestamp of item creation.

key: string

Unique identifier within the namespace.

namespace: string[]

Hierarchical path defining the collection in which this document resides. Represented as an array of strings, allowing for nested categorization. For example: ["documents", "user123"]

score?: number

Relevance/similarity score if from a ranked operation. Higher scores indicate better matches.

This is typically a cosine similarity score between -1 and 1, where 1 indicates identical vectors and -1 indicates opposite vectors.

updatedAt: Date

Timestamp of last update.

value: Record<string, any>

The stored data as an object. Keys are filterable.