pyspark-hnsw
Decision gist · record as of 2026-08-14
Yes, if you need approximate nearest neighbor search in PySpark and are willing to verify Python compatibility and license terms. The low install friction and lack of runtime dependencies make it straightforward to add. However, the aging maintenance status (no release since 2022-12-30) and unclear license warrant checking the repository before production use. Not recommended for new projects unless you have specific PySpark integration requirements that outweigh the maintenance risk.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires PySpark and a compatible Java/Scala runtime environment; Python version support is unspecified.
- Low install friction with pure Python wheels available.
- Maintenance status is aging—last release was 2022-12-30, though the repository remains active with a recent commit on 2025-03-23 and modest community interest (303 stars).
License · maintenance · safety
(unclear) — License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before adopting this package in a commercial or restricted context.
last release 2022-12-30 (1323 days) · last repo commit 2025-03-23 · 303 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 685,650 downloads/mo, #5,352 on PyPI
Alternatives
Verify before relying
pip install pyspark-hnsw
from pyspark_hnsw import HnswIndex
index = HnswIndex()
index.add(item_id, vector, distance_metric='euclidean')- Actual license terms and compliance implications—metadata shows no SPDX or raw license field.
- Minimum Python version and specific PySpark version compatibility requirements.
- Whether the package is actively maintained or in maintenance-only mode given the aging status and release gap.
What it is and what it does
pyspark-hnsw is a PySpark wrapper around a Java/Scala implementation of the HNSW (Hierarchical Navigable Small World) algorithm, a method for performing approximate nearest neighbor search on high-dimensional data. It allows you to build and query indexes that find similar vectors efficiently without scanning every item in a dataset. The package supports seven pre-packaged distance metrics (euclidean, cosine, manhattan, inner product, correlation, canberra, and bray curtis dissimilarity) and exposes a flexible interface for custom distance functions.
The index is thread-safe, serializable, and supports incremental insertion and experimental deletion. It integrates with PySpark's distributed computing model, making it suitable for large-scale similarity search workloads. However, the package has not seen a release since late 2022, and its Python version support is unspecified, so compatibility with modern Python environments should be verified before use.
Use it for
- Build a recommendation engine in PySpark that finds similar items based on embedding vectors.
- Perform large-scale similarity search on text embeddings or image feature vectors in a distributed Spark cluster.
- Index high-dimensional data incrementally and query for approximate nearest neighbors without full-table scans.
- Implement semantic search on document embeddings using multiple distance metrics tailored to your data.
- Prototype or deploy vector search pipelines that integrate with existing PySpark ETL workflows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need approximate nearest neighbor search in PySpark and are willing to verify Python compatibility and license terms.
The low install friction and lack of runtime dependencies make it straightforward to add. However, the aging maintenance status (no release since 2022-12-30) and unclear license warrant checking the repository before production use. Not recommended for new projects unless you have specific PySpark integration requirements that outweigh the maintenance risk.
Install
pyspark-hnsw on PyPI
Before you install
Low install friction with pure Python wheels available. Maintenance status is aging—last release was 2022-12-30, though the repository remains active with a recent commit on 2025-03-23 and modest community interest (303 stars).
Requires PySpark and a compatible Java/Scala runtime environment; Python version support is unspecified.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before adopting this package in a commercial or restricted context.
Quickstart
pip install pyspark-hnsw
from pyspark_hnsw import HnswIndex
index = HnswIndex()
index.add(item_id, vector, distance_metric='euclidean')
Verify before relying
- Actual license terms and compliance implications—metadata shows no SPDX or raw license field.
- Minimum Python version and specific PySpark version compatibility requirements.
- Whether the package is actively maintained or in maintenance-only mode given the aging status and release gap.
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 1,323 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 685,650 / month, #5,352 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: pyspark_hnsw-1.1.0-py2-none-any.whl; pyspark_hnsw-1.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “hnsw algorithm pyspark”
- pyspark-hnswProvides a PySpark-compatible implementation of the Hierarchical…
- voyagerVoyager performs fast approximate nearest-neighbor searches on…
- hnswlibFast approximate nearest neighbor search using the HNSW algorithm…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also hnswlib · pynndescent · usearch · voyager · annoy · nmslib · libcuvs-cu12 · cuvs-cu12 · fastcluster · fastdtw