DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite.You’ll need to install
langchain-community with pip install -qU langchain-community to use this integration
This notebook shows how to use functionality related to the DocArrayHnswSearch.
Setup
Uncomment the below cells to install docarray and get/set your OpenAI api key if you haven’t already done so.Using DocArrayHnswSearch
Similarity search
Similarity search with score
The returned distance score is cosine distance. Therefore, a lower score is better.Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.