# Neighbor

> Ruby gem for approximate nearest neighbor search that can integrate with pgvector and other backends to power vector similarity search in Ruby applications.

- **URL:** https://github.com/ankane/neighbor
- **Category:** sdks-libraries
- **Tags:** Ann, ruby, Similarity Search
- **Updated:** 2025-12-30 18:03
- **Canonical page:** https://vectordb.ever.works/items/neighbor

## Details

# Neighbor

**Category:** SDKs & Libraries  
**Website:** https://github.com/ankane/neighbor  
**Ecosystem:** Ruby, Rails

## Overview
Neighbor is a Ruby gem that adds approximate nearest neighbor (ANN) and vector similarity search to Rails applications. It integrates with multiple database backends, including pgvector, to enable efficient vector-based querying directly from Ruby.

## Features
- **Nearest neighbor search for Rails**  
  - Provides high-level Ruby/Rails interfaces for performing nearest neighbor and similarity searches.

- **Database backend support**
  - **Postgres**
    - Supports the `cube` extension.
    - Supports the `pgvector` extension for vector similarity search.
  - **MariaDB 11.8**
    - Native support for nearest neighbor search on this version.
  - **MySQL 9 (experimental)**
    - Nearest neighbor searching supported when using HeatWave (experimental status).
  - **SQLite (experimental)**
    - Supports vector search via `sqlite-vec`.

- **Additional ecosystem integrations**
  - Companion libraries for other storage backends:
    - **Redis** via `neighbor-redis`.
    - **S3-based vectors** via `neighbor-s3`.

- **Ruby gem packaging**
  - Distributed as a standard Ruby gem for easy inclusion in Rails and other Ruby applications.

- **Open-source licensing**
  - Licensed under the MIT license.

## Pricing
Neighbor is open source under the MIT license and can be used free of charge.

---

_This Markdown mirror is generated by Ever Works for AI agents. The canonical HTML page is at https://vectordb.ever.works/items/neighbor._
