Skip to main content

StorageConfig

The StorageConfig class specifies where the index data is stored. Build it with one of the static factories:

Example Usage


Embeddings

The Embedded LangChain integration accepts any LangChain Embeddings implementation:

Supported Embedding Types

Example Usage


DistanceMetric

DistanceMetric is a string representing the distance metric used for the index. Options include:
  • "cosine": Cosine similarity (recommended for normalized embeddings)
  • "euclidean": Euclidean distance
  • "squared_euclidean": Squared Euclidean distance

Metric Characteristics


Document

LangChain Document object used for storing text with metadata.

Attributes

Example Usage


Filter Format

Metadata filters use a dictionary format for querying documents.

Simple Filters

Advanced Filters

Supported Operators


Return Types

Query Results

Query operations return documents with optional scores:

Score Normalization

Scores are normalized to [0, 1] range where:
  • 1.0 = Perfect match
  • 0.0 = Worst match
The normalization depends on the distance metric used.

Async Support

All methods have async variants prefixed with a:

Example Usage