mirror of
https://github.com/langchain-ai/langchain-postgres.git
synced 2026-07-16 09:54:28 -04:00
[PR #85] feat: add hnsw index functionality to PGVector #158
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langchain-ai/langchain-postgres/pull/85
Author: @wulifu2hao
Created: 7/6/2024
Status: 🔄 Open
Base:
main← Head:add_hnsw📝 Commits (2)
d4608c9feat: add hnsw index functionality to PGVectorb46576badd raise exception in create_hnsw_index📊 Changes
2 files changed (+265 additions, -8 deletions)
View changed files
📝
langchain_postgres/vectorstores.py(+193 -8)📝
tests/unit_tests/test_vectorstore.py(+72 -0)📄 Description
issue: https://github.com/langchain-ai/langchain/issues/23853
description: unlike the PGEmbedding class (which uses "pg_embedding" extension) , the PGVector class (which uses "pg_vector" extension) currently doesn't support HNSW index. Since the pg_embedding project is deprecated since 2023 https://github.com/neondatabase/pg_embedding and it is encouraged to move to pg_vector, I added the HNSW support in the PGVector class
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.