nself supports 6 search engines with the nself search command. Choose the right engine for your use case - from zero-config PostgreSQL full-text search to advanced engines like Elasticsearch.
| Command | Description |
|---|---|
nself search | Show help |
nself search enable [--engine <name>] | Enable search service |
nself search disable | Disable search service |
nself search status | Show search service status |
nself search test [query] | Test search functionality |
nself search reindex | Rebuild search index |
nself search configure | Configure search settings |
nself search setup | Interactive setup wizard |
| Engine | Best For | Memory |
|---|---|---|
| PostgreSQL FTS | Simple full-text, zero extra services | ~0 (uses existing DB) |
| MeiliSearch | Typo-tolerant, instant results | 100-500MB |
| Typesense | Fast, typo-tolerant search | 100-500MB |
| Elasticsearch | Complex queries, analytics | 1-4GB |
| OpenSearch | Elasticsearch alternative (AWS) | 1-4GB |
| Sonic | Lightweight, fast ingestion | 50-100MB |
No additional services needed - uses your existing database:
# Enable PostgreSQL FTS (default, recommended for most projects)
nself search enable --engine postgres
# Test search functionality
nself search test "hello world"Great for user-facing search with typo tolerance:
# Enable MeiliSearch
nself search enable --engine meilisearch
# Rebuild to add the MeiliSearch container
nself build && nself start# Enable Typesense
nself search enable --engine typesense
# Rebuild
nself build && nself startSearch engine settings in your .env file:
# Search Engine Selection
SEARCH_ENGINE=postgres # or: meilisearch, typesense, elasticsearch, opensearch, sonic
# MeiliSearch Settings (when enabled)
MEILISEARCH_MASTER_KEY=your-master-key-minimum-32-chars
MEILISEARCH_HOST=meilisearch
MEILISEARCH_PORT=7700
# Typesense Settings (when enabled)
TYPESENSE_API_KEY=your-api-key
TYPESENSE_HOST=typesense
TYPESENSE_PORT=8108
# Elasticsearch/OpenSearch Settings (when enabled)
ELASTICSEARCH_URL=http://elasticsearch:9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=your-passwordChoose when: You want simplicity, already use PostgreSQL, and don't need typo tolerance. Zero additional memory overhead.
Choose when: Building user-facing search (e-commerce, documentation, blogs) where typo tolerance and instant results matter.
Choose when: You need complex queries, aggregations, analytics, geo-search, or are building an enterprise search solution.
Choose when: Memory is extremely constrained but you still need basic search functionality.
Run nself search status to check configuration. Ensure the search service is running with nself status.
Elasticsearch and OpenSearch require significant memory. Consider MeiliSearch, Typesense, or PostgreSQL FTS for smaller deployments.
Run nself search reindex to rebuild indices after schema changes.