Skip to main content
Ctrl+K
🦜🔗 LangChain  documentation - Home
  • Reference
  • Legacy reference
Ctrl+K
Docs
  • GitHub
  • X / Twitter
Ctrl+K
  • Reference
  • Legacy reference
Docs
  • GitHub
  • X / Twitter

Section Navigation

Base packages

  • Core
  • Langchain
  • Text Splitters
  • Community
  • Experimental

Integrations

  • AI21
  • Airbyte
  • Anthropic
  • AstraDB
  • AWS
  • Azure Dynamic Sessions
  • Chroma
  • Cohere
  • Couchbase
  • Elasticsearch
  • Exa
  • Fireworks
  • Google Community
  • Google GenAI
  • Google VertexAI
  • Groq
  • Huggingface
  • Milvus
  • MistralAI
  • MongoDB
  • Nomic
  • Nvidia Ai Endpoints
  • Ollama
  • OpenAI
  • Pinecone
  • Postgres
    • chat_message_histories
    • translator
    • vectorstores
      • DistanceStrategy
      • PGVector
  • Prompty
  • Qdrant
  • Robocorp
  • Together
  • Unstructured
  • VoyageAI
  • Weaviate
  • LangChain Python API Reference
  • vectorstores
  • DistanceStrategy

DistanceStrategy#

class langchain_postgres.vectorstores.DistanceStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Enumerator of the Distance strategies.

EUCLIDEAN = 'l2'#
COSINE = 'cosine'#
MAX_INNER_PRODUCT = 'inner'#

Examples using DistanceStrategy

  • Google BigQuery Vector Search

  • Kinetica Vectorstore API

  • Oracle AI Vector Search: Vector Store

  • SAP HANA Cloud Vector Engine

  • SemaDB

  • SingleStoreDB

On this page
  • DistanceStrategy
    • EUCLIDEAN
    • COSINE
    • MAX_INNER_PRODUCT

© Copyright 2023, LangChain Inc.