Meilisearch Full-Text Search
Meilisearch instant search engine with web UI for index management.
Overview
Meilisearch is an open-source, lightning-fast search engine built in Rust that delivers instant search experiences with minimal configuration. Originally developed by Meili SAS as an alternative to complex solutions like Elasticsearch and expensive hosted services like Algolia, Meilisearch focuses on simplicity while providing powerful features like typo tolerance, faceted search, and sub-50ms response times. The engine is designed to work out of the box with sensible defaults, making it accessible to developers who need powerful search capabilities without the overhead of managing complex search infrastructure.
This stack combines the core Meilisearch engine with meilisearch-ui, a community-developed web interface that provides visual index management capabilities. While Meilisearch offers a comprehensive RESTful API for programmatic interaction, the web UI simplifies tasks like creating indexes, uploading documents, configuring search settings, and testing queries. The two components communicate over a dedicated Docker network, with the UI connecting to Meilisearch's API to provide real-time index statistics, document management, and search testing capabilities.
This combination is ideal for developers building applications that require instant search functionality, product managers who need to prototype search experiences quickly, and teams migrating from expensive hosted search solutions. Unlike Elasticsearch which requires extensive configuration and tuning, or Algolia which can become costly at scale, this Meilisearch stack provides enterprise-grade search capabilities with minimal operational overhead. The setup is particularly valuable for e-commerce platforms, documentation sites, content management systems, and any application where users expect Google-like search speed and tolerance for typos.
Key Features
- Sub-50ms search response times with built-in performance optimizations
- Automatic typo tolerance without configuration - handles up to 2 character mistakes per word
- Faceted search and filtering with automatic facet detection from document structure
- Custom ranking rules engine allowing fine-tuned relevance scoring based on business logic
- Real-time search highlighting and snippet generation for result previews
- Multi-tenancy support with API key-based access control and tenant isolation
- Visual index management through meilisearch-ui with drag-and-drop document uploads
- RESTful API with comprehensive JSON responses and OpenAPI documentation
Common Use Cases
- 1E-commerce product catalogs requiring instant search with filters for price, category, and attributes
- 2Documentation websites where users need to quickly find specific technical information
- 3Content management systems with large article databases requiring full-text search
- 4SaaS applications needing in-app search functionality for user-generated content
- 5Migration projects moving away from expensive Algolia subscriptions to self-hosted solutions
- 6Development teams prototyping search features before committing to complex Elasticsearch deployments
- 7Small to medium businesses requiring powerful search without dedicated DevOps resources
Prerequisites
- Minimum 1GB RAM available for optimal Meilisearch performance with medium datasets
- Ports 7700 and 24900 available on the host system for API and UI access
- MEILI_MASTER_KEY environment variable set for production security (minimum 16 characters)
- Basic understanding of RESTful APIs for integrating search functionality into applications
- JSON data format knowledge for document indexing and search result handling
- Sufficient disk space for search indexes (typically 1.5-2x the size of source data)
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 meilisearch: 3 image: getmeili/meilisearch:v1.54 container_name: meilisearch5 environment: 6 - MEILI_ENV=production7 - MEILI_MASTER_KEY=${MEILI_MASTER_KEY}8 - MEILI_NO_ANALYTICS=true9 volumes: 10 - meilisearch_data:/meili_data11 ports: 12 - "7700:7700"13 networks: 14 - meilisearch-network15 healthcheck: 16 test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:7700/health"]17 interval: 10s18 timeout: 5s19 retries: 52021 meilisearch-ui: 22 image: riccoxie/meilisearch-ui:latest23 container_name: meilisearch-ui24 ports: 25 - "24900:24900"26 networks: 27 - meilisearch-network2829volumes: 30 meilisearch_data: 3132networks: 33 meilisearch-network: 34 driver: bridge.env Template
.env
1# Meilisearch2MEILI_MASTER_KEY=your-master-key-at-least-16-bytesUsage Notes
- 1API at http://localhost:7700
- 2UI at http://localhost:24900
- 3RESTful API with JSON
- 4Typo-tolerant by default
- 5Faceted search support
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
meilisearch
meilisearch:
image: getmeili/meilisearch:v1.5
container_name: meilisearch
environment:
- MEILI_ENV=production
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- MEILI_NO_ANALYTICS=true
volumes:
- meilisearch_data:/meili_data
ports:
- "7700:7700"
networks:
- meilisearch-network
healthcheck:
test:
- CMD
- wget
- "--no-verbose"
- "--spider"
- http://localhost:7700/health
interval: 10s
timeout: 5s
retries: 5
meilisearch-ui
meilisearch-ui:
image: riccoxie/meilisearch-ui:latest
container_name: meilisearch-ui
ports:
- "24900:24900"
networks:
- meilisearch-network
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 meilisearch:5 image: getmeili/meilisearch:v1.56 container_name: meilisearch7 environment:8 - MEILI_ENV=production9 - MEILI_MASTER_KEY=${MEILI_MASTER_KEY}10 - MEILI_NO_ANALYTICS=true11 volumes:12 - meilisearch_data:/meili_data13 ports:14 - "7700:7700"15 networks:16 - meilisearch-network17 healthcheck:18 test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:7700/health"]19 interval: 10s20 timeout: 5s21 retries: 52223 meilisearch-ui:24 image: riccoxie/meilisearch-ui:latest25 container_name: meilisearch-ui26 ports:27 - "24900:24900"28 networks:29 - meilisearch-network3031volumes:32 meilisearch_data:3334networks:35 meilisearch-network:36 driver: bridge37EOF3839# 2. Create the .env file40cat > .env << 'EOF'41# Meilisearch42MEILI_MASTER_KEY=your-master-key-at-least-16-bytes43EOF4445# 3. Start the services46docker compose up -d4748# 4. View logs49docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/meilisearch-stack/run | bashTroubleshooting
- Meilisearch container fails to start with 'invalid master key': Ensure MEILI_MASTER_KEY is at least 16 characters long and properly set in environment variables
- Search queries return empty results despite indexed documents: Check that searchable attributes are configured correctly and documents contain the expected fields
- UI shows 'Connection failed' to Meilisearch API: Verify both containers are on the same Docker network and Meilisearch health check is passing
- High memory usage during indexing: Reduce batch size when adding documents or increase container memory limits for large datasets
- Slow search performance on large indexes: Review and optimize ranking rules, consider splitting large indexes into smaller tenant-specific indexes
- API returns 403 Forbidden errors: Verify the master key is correctly configured and API requests include proper Authorization headers
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
meilisearchmeilisearch-ui
Tags
#meilisearch#search#full-text#instant-search#algolia-alternative
Category
Database StacksAd Space
Shortcuts: C CopyF FavoriteD Download