LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
LangGraph SDK
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraph-checkpoint-postgresstoreIndexConfig
Interfaceā—Since v0.0

IndexConfig

Copy
interface IndexConfig

Properties

View source on GitHub
property
createAllMetricIndexes: boolean
property
dims: number
property
distanceMetric: DistanceMetric
property
embed: Embeddings | EmbeddingsFunc
property
fields: string[]
property
hnsw: HNSWConfig
property
indexType: VectorIndexType
property
ivfflat: IVFFlatConfig

Whether to create indexes for all distance metrics. If false, only creates index for the specified distanceMetric.

Number of dimensions in the embedding vectors.

Distance metric for vector similarity.

Embedding function to generate embeddings from text. Can be a LangChain Embeddings instance or a function.

Fields to extract text from for embedding generation. Uses JSON path syntax. Defaults to ["$"] (entire document).

HNSW-specific configuration parameters. Only used when indexType is 'hnsw'.

Vector index type to use.

  • 'hnsw': Hierarchical Navigable Small World (best for most use cases)
  • 'ivfflat': Inverted File with Flat compression (good for large datasets)

IVFFlat-specific configuration parameters. Only used when indexType is 'ivfflat'.