Back to directory

PHPVector

A pure-PHP vector database implementing HNSW approximate nearest-neighbour search and BM25 full-text retrieval, which can be combined into a hybrid search pipeline.

PHPVector

PHPVector implements HNSW (Hierarchical Navigable Small World) search for approximate nearest-neighbour vector queries and BM25 for full-text retrieval, entirely in PHP with no external extensions required for core functionality; an optional pcntl extension enables asynchronous document writes for lower insert latency. It requires PHP 8.2 or newer and installs through Composer.

A document holds a dense embedding vector, optional raw text for BM25 matching, and arbitrary metadata, with an automatically generated UUID if none is given. Hybrid search offers reciprocal rank fusion, which is rank-based, scale-invariant and needs no tuning, or a weighted combination that normalizes both score ranges before applying explicit vector and text weights.

Both the HNSW and BM25 engines are fully configurable through config objects passed to the database constructor.

More in Databases

See all 294
  • SQLBraid

    clickin.github.io

    A SQL-first data-access toolkit for TypeScript that keeps ordinary SQL visible in tagged template literals, binds interpolated values safely by default, supports readable conditional SQL directives, and lets a schema validate the returned rows.

  • A SQL-style query language and toolchain for the Qdrant vector database, covering dense, sparse and hybrid search, filtering and multitenancy, with the same grammar running from a CLI, Python, Node.js, Rust, WebAssembly and an in-process edge engine.

  • Fast Knowledge

    github.com

    A self-hosted, Java-based knowledge base for small and mid-sized organizations, turning internal documents into a searchable, question-answerable and audit-exportable knowledge asset with hybrid retrieval and Docker deployment.