# Meilisearch + Mini Dashboard

> Lightning fast search engine with typo tolerance.

- Category: Database Stacks
- Difficulty: beginner
- Components: meilisearch, meilisearch-dashboard
- Tags: meilisearch, search, full-text, typo-tolerant, instant
- Source: https://docker.recipes/databases/meilisearch-complete

## Overview

Meilisearch is an open-source search engine built in Rust that delivers sub-50ms search responses with built-in typo tolerance and zero-configuration setup. Originally developed by the French company Meili, it emerged as a developer-friendly alternative to complex solutions like Elasticsearch, focusing on instant search experiences without the operational overhead. Unlike traditional search engines that require extensive configuration and tuning, Meilisearch works intelligently out of the box with features like automatic typo correction, relevance ranking, and faceted search.

This stack combines the core Meilisearch engine with the riccoxie/meilisearch-ui dashboard, creating a complete search solution with visual management capabilities. The dashboard provides an intuitive interface for index management, document browsing, search testing, and analytics visualization, while Meilisearch handles the high-performance search operations through its RESTful API. The two components communicate over a dedicated Docker network, with the dashboard automatically connecting to the Meilisearch instance.

This combination is ideal for developers and organizations who need powerful search capabilities without the complexity of enterprise solutions. Startups building e-commerce platforms, content sites, or applications requiring instant search will benefit from Meilisearch's simplicity and performance, while the dashboard makes it accessible to non-technical team members for content management and search optimization.

## Features

- Sub-50ms search responses with built-in performance optimization
- Automatic typo tolerance with intelligent correction algorithms
- Faceted search and filtering with customizable attributes
- Visual dashboard for index management and search analytics
- Highlighting and snippet generation for search results
- Custom ranking rules with attribute-based relevance tuning
- Multi-tenancy support with API key-based access control
- RESTful API with comprehensive search and indexing endpoints

## Use cases

- E-commerce product catalogs with instant search and filtering
- Documentation sites requiring fast content discovery
- Content management systems with full-text search capabilities
- Small to medium-scale applications needing typo-tolerant search
- Development environments for testing search implementations
- Internal knowledge bases and company wikis
- Educational platforms with course and content search functionality

## Prerequisites

- Minimum 256MB RAM available (1GB+ recommended for production)
- Docker and Docker Compose installed on the host system
- Ports 7700 and 24900 available on the host machine
- Basic understanding of REST APIs for Meilisearch integration
- MASTER_KEY environment variable configured for production security

## docker-compose.yml

```yaml
services:
  meilisearch:
    image: getmeili/meilisearch:latest
    environment:
      - MEILI_MASTER_KEY=${MASTER_KEY}
      - MEILI_ENV=production
      - MEILI_NO_ANALYTICS=true
    volumes:
      - meilisearch-data:/meili_data
    ports:
      - "7700:7700"
    networks:
      - meilisearch-network
    restart: unless-stopped

  dashboard:
    image: riccoxie/meilisearch-ui:latest
    environment:
      - MEILI_HOST=http://meilisearch:7700
    ports:
      - "24900:24900"
    depends_on:
      - meilisearch
    networks:
      - meilisearch-network
    restart: unless-stopped

volumes:
  meilisearch-data:

networks:
  meilisearch-network:
    driver: bridge
```

## .env

```bash
# Meilisearch
MASTER_KEY=your-master-key-at-least-16-chars

# Generate key: openssl rand -base64 32
```

## Usage notes

- API at http://localhost:7700
- Dashboard at http://localhost:24900
- Typo tolerance built-in
- Faceted search
- RESTful API

## Troubleshooting

- Dashboard shows connection error: Verify the MEILI_HOST environment variable points to http://meilisearch:7700 and both containers are on the same network
- Meilisearch returns 401 Unauthorized: Ensure the MASTER_KEY environment variable is set and API requests include the correct Authorization header
- Search queries return empty results: Check that documents are properly indexed and searchable attributes are configured correctly through the API
- Container fails to start with permission errors: Verify the meilisearch-data volume has proper write permissions and sufficient disk space
- Dashboard interface not loading: Confirm port 24900 is not blocked by firewall and the dashboard container has successfully started after meilisearch

