Interface VectorizeDoc

Utility type for a document that wishes to leverage automatic vectorization (assuming the collections is vectorize-enabled).

Example

export interface Idea extends VectorizeDoc {
  category: string,
}

db.collections<Idea>('ideas').insertOne({
  category: 'doors',
  $vectorize: 'Upside down doors',
});
interface VectorizeDoc {
    $vector?: DataAPIVector;
    $vectorize?: string;
}

Hierarchy (view full)

Properties

$vector?: DataAPIVector

A raw vector

$vectorize?: string

A string field to be automatically vectorized