Damp

Meilisearch

Full-text search engine

Lightning-fast full-text search engine with typo tolerance and instant results using Meilisearch latest version.

Docker Configuration

Image: getmeili/meilisearch:latest
Ports: 7700:7700
Volume: damp-meilisearch:/meili_data

DAMP identifies the service using Docker labels. Container name is auto-generated by Docker.

Port Configuration

Default ports: 7700 (host) → 7700 (container)

If port 7700 is occupied on the host machine, DAMP automatically uses the next available port. Check the DAMP interface to see the actual port assigned.

Environment Variables

VariableValueDescription
MEILI_NO_ANALYTICSfalseAnonymous analytics
MEILI_MASTER_KEYmasterkeyAdmin API key

Connection Information

From Host Machine (Windows)

Web UI:

http://localhost:7700

API:

http://localhost:7700

Use the master key masterkey for API requests.

From Project Containers

Use the container name or ID shown in the DAMP interface.

API Endpoint:

http://[container-name]:7700

Replace [container-name] with the actual container name displayed in DAMP.

Laravel Scout Integration

Install Scout

composer require laravel/scout
composer require meilisearch/meilisearch-php

Configure .env

SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://[container-name]:7700
MEILISEARCH_KEY=masterkey

Replace [container-name] with the actual container name displayed in DAMP.

Make Model Searchable

use Laravel\Scout\Searchable;

class Post extends Model
{
    use Searchable;

    public function toSearchableArray()
    {
        return [
            'title' => $this->title,
            'content' => $this->content,
        ];
    }
}

Search Usage

// Search posts
$posts = Post::search('laravel')->get();

// Search with filters
$posts = Post::search('laravel')
    ->where('published', true)
    ->get();

Direct API Usage

Create Index

curl -X POST 'http://localhost:7700/indexes' \
  -H 'Authorization: Bearer masterkey' \
  -H 'Content-Type: application/json' \
  --data '{ "uid": "movies", "primaryKey": "id" }'

Add Documents

curl -X POST 'http://localhost:7700/indexes/movies/documents' \
  -H 'Authorization: Bearer masterkey' \
  -H 'Content-Type: application/json' \
  --data '[
    { "id": 1, "title": "Inception" },
    { "id": 2, "title": "Interstellar" }
  ]'
curl -X POST 'http://localhost:7700/indexes/movies/search' \
  -H 'Authorization: Bearer masterkey' \
  -H 'Content-Type: application/json' \
  --data '{ "q": "inception" }'

Features

  • Instant search with sub-50ms response times
  • Typo tolerance finds results even with misspellings
  • Combine search with filters
  • Build search interfaces with faceting
  • Multilingual support

Always use the master key (masterkey) for API requests in development.

Data Persistence

All search indexes are stored in the damp-meilisearch Docker volume. Removing the service preserves your indexes.

On this page