Interface CreateCollectionOptions

Options for creating a new collection/index in the vector store. CreateCollectionOptions

interface CreateCollectionOptions {
    similarityMetric?: "cosine" | "euclidean" | "dotproduct";
    overwriteIfExists?: boolean;
    replicas?: number;
    shards?: number;
    providerSpecificParams?: Record<string, any>;
}

Properties

similarityMetric?: "cosine" | "euclidean" | "dotproduct"

The similarity metric for the collection.

overwriteIfExists?: boolean

If a collection with the same name exists, should it be overwritten?

replicas?: number

Number of replicas for the collection (if supported).

shards?: number

Number of shards for the collection (if supported).

providerSpecificParams?: Record<string, any>

Any other parameters specific to the vector store provider for collection creation (e.g., indexing options, cloud region).