Interface HnswlibVectorStoreConfig

Configuration for HnswlibVectorStore

interface HnswlibVectorStoreConfig {
    id: string;
    customProps?: Record<string, any>;
    type: "hnswlib";
    persistDirectory?: string;
    defaultEmbeddingDimension?: number;
    similarityMetric?: "cosine" | "euclidean" | "dotproduct";
    hnswM?: number;
    hnswEfConstruction?: number;
    hnswEfSearch?: number;
}

Hierarchy (view full)

Properties

id: string

A unique identifier for this specific provider instance (e.g., "pinecone-main-prod", "weaviate-dev-local"). This ID is used by the VectorStoreManager to retrieve this provider.

customProps?: Record<string, any>

Any other custom properties or configurations specific to this provider instance not covered by standard fields.

type: "hnswlib"

The type of the vector store provider (e.g., "pinecone", "weaviate", "in_memory", "lancedb"). This helps in selecting the correct implementation.

persistDirectory?: string

Directory to persist index files. If not set, indexes are in-memory only.

defaultEmbeddingDimension?: number

Default embedding dimension for new collections

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

Default similarity metric

hnswM?: number

HNSW M parameter (number of connections per node, default 16)

hnswEfConstruction?: number

HNSW efConstruction parameter (index build quality, default 200)

hnswEfSearch?: number

HNSW efSearch parameter (search quality, default 100)