Files
langchain-python/langchain/vectorstores
Raouf Chebri 6fc24743b7 Add pg_hnsw vectorstore integration (#6893)
Hi @rlancemartin, @eyurtsev!

- Description: Adding HNSW extension support for Postgres. Similar to
pgvector vectorstore, with 3 differences
      1. it uses HNSW extension for exact and ANN searches, 
      2. Vectors are of type array of real
      3. Only supports L2
      
- Dependencies: [HNSW](https://github.com/knizhnik/hnsw) extension for
Postgres
  
  - Example:
  ```python
    db = HNSWVectoreStore.from_documents(
      embedding=embeddings,
      documents=docs,
      collection_name=collection_name,
      connection_string=connection_string
  )
  
  query = "What did the president say about Ketanji Brown Jackson"
docs_with_score: List[Tuple[Document, float]] =
db.similarity_search_with_score(query)
  ```

The example notebook is in the PR too.
2023-07-05 08:10:10 -07:00
..
2023-04-24 11:50:55 -07:00
2023-07-02 08:22:24 -06:00
2023-07-03 14:21:36 -06:00
2023-06-22 08:00:15 -07:00
2023-04-27 08:14:36 -07:00
2023-07-03 14:21:36 -06:00
2023-06-18 18:33:15 -07:00
2023-04-24 19:54:15 -07:00
2023-07-02 12:15:50 -07:00
2023-04-22 08:26:19 -07:00