# Manticore Search

> Open-source database for full-text, vector, and hybrid search

- Category: Retrieval & Knowledge (RAG) / Vector Databases
- Language: C++
- Licence: GPL-3.0-or-later
- Repository: https://github.com/manticoresoftware/manticoresearch
- Website: https://manticoresearch.com
- Canonical page: https://ai-tldr.dev/tools/manticore-search/

## In short

Manticore Search is an open-source database built for search. It handles full-text search, vector search, and hybrid search (combining both in a single query) and is positioned as an alternative to Elasticsearch. It sits in the Vector Databases category of the Retrieval & Knowledge (RAG) tools and is open-source, written in C++ and licensed GPL-3.0-or-later.

## Overview

Manticore Search is an open-source database built for search. It handles full-text search, vector search, and hybrid search (combining both in a single query) and is positioned as an alternative to Elasticsearch. It is written in C++ and aims to keep response times low and resource use small, using around 40MB of RAM for an empty instance.

It is SQL-first: SQL is its native query language, and it speaks the MySQL protocol, so you can connect with a standard MySQL client. For programmatic use it also exposes an HTTP JSON API with Elasticsearch-compatible writes, plus official clients for languages like PHP, Python, JavaScript, TypeScript, Java, Go, and Rust.

As a search-focused database in the vector database space, it suits teams that want full-text and vector retrieval together without running a heavier search stack. It offers row-wise storage for small to large datasets and optional columnar storage (via the Manticore Columnar Library) for data too big to fit in RAM.

## What it does

- Full-text, vector, and hybrid search, with hybrid combining full-text and vector retrieval in one query
- SQL-first with MySQL protocol support, so you can connect with your usual MySQL client
- HTTP JSON API with Elasticsearch-compatible writes for data and schema management
- Row-wise storage plus optional columnar storage for datasets too large to fit in RAM
- Multithreaded architecture with query parallelization to use all CPU cores
- Official clients for PHP, Python, JavaScript, TypeScript, Java, Elixir, Go, and Rust

## Getting started

Run Manticore in Docker, connect over the MySQL protocol, then create a table and run a full-text search.

1. Start Manticore and open a MySQL shell

   Run the official Docker image, wait until it accepts connections, then open an interactive MySQL session inside the container.

```bash
docker run --name manticore --rm -d manticoresearch/manticore && until docker logs manticore 2>&1 | grep -q "accepting connections"; do sleep 1; done && docker exec -it manticore mysql && docker stop manticore
```

2. Create a table

   Define a table with text and integer columns and basic full-text options.

```sql
create table movies(title text, year int) morphology='stem_en' html_strip='1' stopwords='en';
```

3. Insert data

   Add a few rows to search over.

```sql
insert into movies(title, year) values ('The Seven Samurai', 1954), ('Bonnie and Clyde', 1954), ('Reservoir Dogs', 1992);
```

4. Run a full-text search

   Use match() for full-text queries and highlight() to see the matched text.

```sql
select highlight(), year from movies where match('the dog');
```

## When to use it

- Add fast full-text search to an application using SQL and a MySQL client
- Combine keyword and vector search in one query for better relevance (hybrid search)
- Run log analytics or other large datasets as a lighter alternative to Elasticsearch
- Store data too big for RAM using columnar storage
