惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
C
Cyber Attacks, Cyber Crime and Cyber Security
A
Arctic Wolf
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
Troy Hunt's Blog
小众软件
小众软件
L
LangChain Blog
Schneier on Security
Schneier on Security
D
DataBreaches.Net
爱范儿
爱范儿
P
Proofpoint News Feed
博客园 - 聂微东
M
MIT News - Artificial intelligence
Hacker News: Ask HN
Hacker News: Ask HN
T
Tailwind CSS Blog
Vercel News
Vercel News
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
T
Threat Research - Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
月光博客
月光博客
Spread Privacy
Spread Privacy
C
Cisco Blogs
S
Securelist
量子位
S
Security @ Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tenable Blog
WordPress大学
WordPress大学
T
The Exploit Database - CXSecurity.com
宝玉的分享
宝玉的分享
C
Cybersecurity and Infrastructure Security Agency CISA
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
MongoDB | Blog
MongoDB | Blog
C
CERT Recently Published Vulnerability Notes
Help Net Security
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
B
Blog RSS Feed
博客园_首页
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org

Sealos Blog

Build a Full-Stack App with Claude Code + InsForge — Zero Backend Code | Sealos Blog InsForge vs Supabase: Which Backend for AI-Powered Development? | Sealos Blog Kubernetes NodePort Exhaustion: SSH Gateway Solution | Sealos Blog Claude Code Metrics Dashboard: Grafana Setup (2026) | Sealos Blog What Is RustFS? Apache 2.0 MinIO Alternative (2026) | Sealos Blog Claude Code Mobile: iPhone, Android & SSH (2026) | Sealos Blog Eaglercraft Server Hosting: Fast Setup (2026) | Sealos Blog An Honest Review: Migrating a Complex Microservice App from Heroku to Sealos | Sealos Blog The Ultimate Guide to Kubernetes Audit Logging for Security and Compliance | Sealos Blog Cost Optimization Shootout: Sealos Autonomous FinOps vs. Kubecost Manual Reports | Sealos Blog For CTOs: How to Cut Your Cloud Bill by 50% Without Sacrificing Performance | Sealos Blog Building Resilient Systems: A Deep Dive into Sealos High-Availability and Auto-Failover | Sealos Blog Building a Scalable Event-Driven Architecture with Sealos Managed Kafka | Sealos Blog Beyond kubectl apply: 5 GitOps Best Practices for Production-Ready CI/CD on Sealos | Sealos Blog Advanced RAG Pipelines: Why Your Choice of Vector Database (like Milvus) Matters | Sealos Blog Advanced MLOps: How to Monitor and Evaluate LLM Applications in Production | Sealos Blog A Developer's Guide to Kubernetes RBAC: Securing Your Cluster the Easy Way with Sealos | Sealos Blog A CISO's Guide to Cloud Development: Securing the CI/CD Pipeline with Sealos DevBox | Sealos Blog What is Kubernetes Multi-Tenancy? A Guide for Platform Engineers | Sealos Blog What is Infrastructure from Code (IfC)? The Next Step After Infrastructure as Code (IaC) | Sealos Blog What is GitOps? A Beginner's Guide to "Push-to-Deploy" Workflows | Sealos Blog What is eBPF? The Future of Kubernetes Networking and Security | Sealos Blog What is an "AI-Native" Platform? (And Why You Need One for MLOps) | Sealos Blog What is an Agentic Workflow? Building the Next Generation of AI Apps | Sealos Blog What is a Kubernetes Chargeback Model (And How Does it Save You Money?) | Sealos Blog What is a "Headless" Development Environment? (And How it Works with VS Code) | Sealos Blog What is a Graph-Based Vector Database? (And When to Use It Over Milvus) | Sealos Blog What is a "Cloud Operating System"? The Next Evolution of PaaS Explained | Sealos Blog The Real Cost of EKS: How Sealos Delivers a Simpler, Cheaper Kubernetes Experience | Sealos Blog The 3 Types of Kubernetes Autoscaling (HPA, VPA, CA) and How Sealos Manages Them for You | Sealos Blog Sealos vs Vercel: Why a Cloud OS Beats a Frontend Platform for Full-Stack Apps | Sealos Blog Sealos vs. Render vs. Fly.io: A 2025 Guide to the Best Heroku Alternatives | Sealos Blog Sealos vs. OpenShift: Kubernetes for Developers vs. Kubernetes for Ops Teams | Sealos Blog Sealos vs. Netlify: When to Choose a Full Kubernetes Platform over a Static Site Hoster | Sealos Blog Sealos vs. DigitalOcean App Platform: A Head-to-Head Comparison on Cost, Features, and Scalability | Sealos Blog Sealos vs. AWS Elastic Beanstalk: The Modern PaaS for Developers Who Hate YAML | Sealos Blog Sealos DevBox vs. AWS Cloud9: Why Your CDE Should Be Platform-Agnostic | Sealos Blog For Developers: Stop Wasting Time on DevOps. A 10-Minute Guide to Shipping Faster with DevBox. | Sealos Blog Deploying n8n with Docker: From Local Setups to a Radically Simple Cloud Alternative | Sealos Blog The Impact of Prompt Bloat: How the Sealos AI Proxy Can Cache Queries and Cut LLM Costs | Sealos Blog The FinOps Playbook: How to Implement Kubernetes Chargebacks and Showbacks with Sealos | Sealos Blog Smoke Testing for ML Pipelines: Catching Data and Model Errors Before They Hit Production | Sealos Blog Optimizing PostgreSQL Performance: A Guide to Sealos Managed Database Tuning | Sealos Blog Managing Kubernetes Multi-Tenancy: How Sealos Enforces Resource Quotas and Network Policies | Sealos Blog From Days to Minutes: How to Standardize Developer Environments for Your Entire Engineering Org | Sealos Blog For Platform Engineers: How to Build a Golden Path IDP (Internal Developer Platform) with Sealos | Sealos Blog For FinOps Managers: The 5 Leakiest Buckets in Your Kubernetes Budget (And How to Plug Them) | Sealos Blog For Educators & IT Admins: How to Provide a Secure, Scalable Cloud Lab for 1000+ Students on a Budget | Sealos Blog What is a Vector Database? A Beginner's Guide to Milvus, Pinecone, and More | Sealos Blog Why Your Microservices Architecture is Failing (And How a Cloud OS Can Fix It) | Sealos Blog The Power of Autoscaling: A Deep Dive into HPA, VPA, and Cluster Autoscaler | Sealos Blog The Total Economic Impact of Cloud Development Environments (CDEs) | Sealos Blog The Illustrated Guide to the Kubernetes Control Plane | Sealos Blog The MLOps Lifecycle Explained: From Data Prep to Model Deployment | Sealos Blog Beyond Vercel's AI Cloud: The Case for an AI-Native Operating System | Sealos Blog The Architecture of a Modern AI Application: A 2025 Blueprint | Sealos Blog GitHub Codespaces is Great, But Your Workflow is Incomplete. Here's Why. | Sealos Blog The Best Heroku Alternatives in 2025 for Scalability and Cost | Sealos Blog CAST AI vs. Kubecost vs. Sealos: Choosing the Right K8s Cost Management Tool | Sealos Blog DevBox vs. Gitpod vs. Replit: An Unbiased Comparison for 2025 | Sealos Blog Unlocking Hidden Savings: A Guide to Using Spot Instances Safely in Kubernetes | Sealos Blog Can a CDE Really Replace Your MacBook Pro? A Performance Benchmark | Sealos Blog The End of "Works on My Machine": Achieving 100% Reproducible Builds with DevBox | Sealos Blog The Ultimate Guide to GPU Provisioning and Management in Kubernetes | Sealos Blog Rightsizing Kubernetes Workloads: How to Stop Wasting Money on CPU and Memory Requests | Sealos Blog The 2025 Guide to Kubernetes Cost Optimization: 10 Strategies to Cut Your Bill in Half | Sealos Blog FinOps for Startups: How to Build a Cost-Conscious Culture from Day One | Sealos Blog How to Onboard a New Developer in Under 5 Minutes with Sealos DevBox | Sealos Blog Calculating Kubernetes Costs: A Breakdown of EKS, GKE, and AKS Pricing Models | Sealos Blog Case Study: How We Reduced Our Kubernetes Bill by 87% with Sealos | Sealos Blog Are You Overpaying for Managed Kubernetes? The True Cost of Vendor Lock-in | Sealos Blog Beyond Monitoring: How Sealos Autonomously Optimizes Your Cloud Spend | Sealos Blog A Practical Guide to Kubernetes Security: Hardening Your Cluster in 2025 | Sealos Blog A Secure-by-Design Development Workflow with Isolated Cloud Environments | Sealos Blog Setting Up a Collaborative Python Data Science Environment with DevBox | Sealos Blog Using the Sealos AI Proxy to Manage and Cache LLM API Calls | Sealos Blog Migration Guide: Moving Your Node.js & Postgres App from Heroku to Sealos in Under an Hour | Sealos Blog Serving Machine Learning Models at Scale: A Guide to Inference Optimization | Sealos Blog Headless Development with Sealos: Using Your Local VS Code with a Powerful Cloud Backend | Sealos Blog How to Build and Deploy a RAG Pipeline with Llama 3 and Milvus on Sealos | Sealos Blog From Localhost to Production in 15 Minutes: A Full-Stack CDE Workflow with Sealos DevBox | Sealos Blog GitOps on Autopilot: Implementing a CI/CD Pipeline with Sealos and GitHub Actions | Sealos Blog Fine-Tuning Open-Source LLMs on a Budget with Sealos | Sealos Blog From Docker Compose to Kubernetes: A Simple Migration Path with Sealos | Sealos Blog Building an AI Agentic Workflow with LangChain and Sealos | Sealos Blog What is Helm for Kubernetes? The Ultimate Package Manager Explained | Sealos Blog What is a Custom Resource Definition (CRD) in Kubernetes? | Sealos Blog What is a Kubernetes StatefulSet? A Practical Guide | Sealos Blog What is a Kubernetes Ingress Controller? A Guide to Smart Traffic Routing | Sealos Blog What is a Kubernetes Operator? Automating Complex Applications | Sealos Blog What is a Kubernetes Service? A Simple Guide for Developers | Sealos Blog Streamlining Your CI/CD Pipeline with a DevBox Build Environment | Sealos Blog Why Standardized Development Environments Are Key to Team Velocity | Sealos Blog What Is GitHub Codespace? | Sealos Blog DevBox Install? Skip It Entirely. Get a Ready-to-Code Environment in One Click with Sealos DevBox. | Sealos Blog How to Set Up a DevBox: The Ultimate Guide to 1-Click Cloud Development | Sealos Blog Empowering Indie Devs and Startup Teams: How Sealos DevBox Accelerates Agile Development | Sealos Blog From Chaos to Consistency: How Sealos DevBox Transforms Enterprise Development Workflows | Sealos Blog From Campus Labs to Cloud Freedom: How Sealos DevBox Supercharges Student Development | Sealos Blog How Sealos DevBox Cut Container Commit Time from 15 Minutes to 1 Second | Sealos Blog
Meilisearch Tutorial: Installation, Usage, and Flarum Integration | Sealos Blog
Sealos · 2024-11-21 · via Sealos Blog

Search functionality has become an indispensable part of almost every application today. Whether it's an e-commerce platform, a content management system (CMS), or an internal corporate knowledge base, users expect to find the information they need quickly and accurately. However, traditional search solutions often face numerous challenges: slow response times, poor relevance, difficulty scaling with large datasets, and lack of flexibility. These issues not only negatively impact the user experience but can also lead to user churn and ultimately hinder business growth.

To tackle these problems, let's introduce you to a powerful and flexible open-source search engine: Meilisearch. Built with Rust, Meilisearch stands out for its simple deployment process, blazing-fast query responses, and rich feature set. You can run the Meilisearch server and start querying with just a single command-line binary, significantly lowering the barrier to entry for using a search engine. It supports advanced features like typo tolerance and schemaless indexing, and even provides a web frontend interface for demonstration purposes.

In this tutorial, we'll dive deep into Meilisearch's core advantages and practical applications. We will cover:

  • An overview of Meilisearch's core features and benefits
  • How to install and configure Meilisearch (including a super-easy method!)
  • Basic usage of Meilisearch's API
  • Integrating Meilisearch into a real-world application (using Flarum forum as an example)
  • A comparison of Meilisearch with other search solutions

Before we begin, please ensure you have the following:

  • Basic knowledge of command-line operations
  • A fundamental understanding of RESTful APIs
  • (Optional) A Sealos account for quickly deploying Meilisearch

Meilisearch is a powerful, open-source search engine written in Rust. It delivers lightning-fast full-text search capabilities and is designed to be easy to use and integrate. Meilisearch's philosophy revolves around these core principles:

  1. Speed First: Returns results in under 50 milliseconds, regardless of dataset size.
  2. Relevance Priority: Smart ranking algorithms ensure the most relevant results always appear first.
  3. Developer-Friendly: Provides an intuitive API and comprehensive documentation, drastically reducing integration and usage complexity.
  4. Highly Customizable: Flexible configuration options allow developers to tailor search behavior to specific needs.

Since its initial release in 2018, Meilisearch has quickly gained traction in the open-source community thanks to its ease of use and exceptional performance. It currently boasts over 40,000 stars on GitHub.

Star history chart for the Meilisearch open-source project on GitHubStar history chart for the Meilisearch open-source project on GitHub

Meilisearch offers a wide array of search functionalities suitable for everything from personal projects to large-scale enterprise applications. Here are its core features:

Search Performance

  • Lightning-Fast Speed: Delivers results typically under 50ms, regardless of dataset size.
  • Instant Search: Supports "search-as-you-type" for real-time feedback.
  • Typo Tolerance: Intelligently handles typos, returning relevant results even with spelling mistakes in the query.

Relevance Optimization

  • Custom Ranking Rules: Allows customization of result sorting based on business logic.
  • Faceted Search: Supports filtering and navigation across multiple dimensions or categories.
  • Synonym Management: Define synonyms to enhance search flexibility (e.g., "pants" matches "trousers").

Multi-Language Support

  • Optimized for Many Languages: Tuned for various languages, including non-Latin scripts like Chinese and Japanese.
  • Stop Word Handling: Configurable list of common words to ignore for better relevance (e.g., "the", "a", "is").

Advanced Functionality

  • Geosearch: Supports searching and sorting based on geographical location.
  • Multi-Tenancy: Enables data isolation and access control using tenant tokens.
  • Highlighting: Highlights matching terms within search results.
  • Document Management: Supports adding, updating, and deleting documents within indexes.

Developer Experience

  • RESTful API: Offers a clean and straightforward API for easy integration.
  • Multi-Language SDKs: Official SDKs available for various popular programming languages.
  • Detailed Documentation: Provides comprehensive guides and examples.
  • Self-Hostable: Allows deployment and management on your own infrastructure.

To better illustrate Meilisearch's advantages, let's compare it with other popular search solutions on the market:

FeatureMeilisearchElasticsearchAlgolia
Response Speed<50msVaries (often >100ms)<100ms
Ease of UseHighMediumHigh
Typo ToleranceBuilt-inRequires ConfigurationBuilt-in
Language SupportExcellentGoodExcellent
GeosearchSupportedSupportedSupported
Open SourceYes (MIT)Yes (Core, some features paid)No (SaaS)
PricingFree (Self-hosted)Free (Self-hosted), Paid CloudPaid SaaS

While Elasticsearch might offer broader functionality and a larger ecosystem, and Algolia excels in its cloud offering and out-of-the-box experience, Meilisearch uniquely shines in speed, ease of use, and open-source friendliness. It strikes a perfect balance, especially for small to medium-sized projects and teams wanting full control over their search infrastructure.

Meilisearch is relatively simple to install and use, offering various installation methods to suit different environments and needs.

Even if you don't have a technical background, you don't need to worry about installation. The Sealos App Store provides a one-click deployment template – just click your mouse, and you're done. It's incredibly smooth.

If you want to quickly deploy Meilisearch without getting bogged down in tedious installation and configuration, give Sealos a try.

Open the Meilisearch application template directly:

Deploy on Sealos

Then, click "Deploy on Sealos" in the top right corner.

If this is your first time using Sealos, you'll need to register and log in to your Sealos public cloud account. After logging in, you'll be immediately redirected to the template deployment page.

There are two crucial environment variables to pay special attention to here. Configuring these correctly ensures the security and performance of your Meilisearch instance.

  1. MEILI_ENV: Sets the instance environment. It can only be production or development.

    • production mode: Disables the search preview interface for security.
    • development mode: Enables the search preview interface.
  2. MEILI_MASTER_KEY: Sets the master key for Meilisearch, which automatically protects all routes except GET /health. Other endpoints, including the search preview interface, can only be accessed using an API key derived from this master key.

    • In production mode:
      • Providing a master key is mandatory.
      • If no master key is provided, or if it's less than 16 bytes long, Meilisearch will throw an error and refuse to start.
    • In development mode:
      • Providing a master key is optional.
      • If no master key is provided, all routes are unprotected and publicly accessible.

Regardless of the mode, if you don't provide a master key or if the provided key is less than 16 bytes, Meilisearch will suggest using an automatically generated one.

In summary: A master key is required for production mode; it's optional for development mode.

Generating a key is very simple. Just execute the following command in a Linux or macOS terminal to generate a random key:

After filling in the parameters, click "Deploy App" in the top right corner to start the deployment.

Deploying Meilisearch application on SealosDeploying Meilisearch application on Sealos

Once deployment is complete, click the application's "Details" to go to its details page.

Meilisearch application details page on SealosMeilisearch application details page on Sealos

Wait for the application status to become running, then click the "Public Address" to open the Meilisearch search preview dashboard.

When you open it, it looks like this. Enter the master key you set to gain access.

Meilisearch login screen prompting for the master keyMeilisearch login screen prompting for the master key

Meilisearch provides an intuitive RESTful API, making integration with various programming languages and frameworks straightforward. Here are some basic operation examples using curl:

Create an Index

An index is where your documents (data records) are stored.

(Replace YOUR_MASTER_KEY with your actual key, or an appropriate API key)

Add Documents

Add some data to your newly created index.

Search Documents

Perform a search query on your indexed data.

(This will likely return the "Wonder Woman" document)

To showcase Meilisearch's power in a real-world application, we'll use the Flarum forum software as an example, demonstrating how to integrate Meilisearch to enhance its search capabilities.

For instructions on installing and using Flarum, refer to our previous article: Flarum Installation and Usage Tutorial

Install the Meilisearch PHP SDK

In the Flarum application details interface on Sealos, click the terminal button in the bottom right corner:

Opening the terminal for the Flarum application within the SealosOpening the terminal for the Flarum application within the Sealos

In the opened terminal, execute the following command to install the Meilisearch PHP SDK (assuming Flarum uses Composer and extensions are managed this way):

Install the Scout Search Extension for Flarum

Similarly, in the Flarum container terminal, execute the following command to install the Scout Search extension (which bridges Laravel Scout functionality, often used for search integration, into Flarum):

Enable the Scout Extension

In the Flarum administration panel, enable the Scout extension. Then, configure it to use "Meilisearch" as the search engine. You can optionally specify an index name (e.g., flarum_posts); if left blank, it might use a default.

Flarum admin panel showing the extensions list, highlighting the Scout extensionFlarum admin panel showing the extensions list, highlighting the Scout extension

Next, you need to configure the Meilisearch URL (Host) and API Key.

Scout extension settings within Flarum admin, showing fields for Meilisearch Host and KeyScout extension settings within Flarum admin, showing fields for Meilisearch Host and Key

If your Meilisearch and Flarum instances are deployed in the same Sealos availability zone (or namespace), you can use Meilisearch's internal network address. Go to the Meilisearch application details page on Sealos, click the "Private Address" to copy it, and paste this value into the "Meilisearch Host" field in the Scout plugin settings. Use the MEILI_MASTER_KEY you set during deployment for the API Key field.

Increase Meilisearch Memory Allocation

Meilisearch deployed via the default Sealos template might only have 128MB of memory allocated. This is often insufficient when integrating with an application like Flarum. It's recommended to increase this to at least 1GB. Here's how:

Go to the Meilisearch application details page on Sealos and click "Update" in the top right corner:

Meilisearch application details page on SealosMeilisearch application details page on Sealos

Adjust the memory allocation to 1G (1 Gigabyte), then click "Update" to apply the changes.

Sealos Dashboard for changing resource allocations, setting Meilisearch memory to 1GSealos Dashboard for changing resource allocations, setting Meilisearch memory to 1G

Import Flarum Data into Meilisearch Index

Use the following command within the Flarum terminal to import your existing forum data (posts, discussions, users, etc.) into the Meilisearch index managed by Scout:

A successful import will look something like this in the terminal output:

Terminal output showing the successful completion of the 'php flarum scout:import-all' commandTerminal output showing the successful completion of the 'php flarum scout:import-all' command

Finally, let's test the search functionality (the screenshot shows a Chinese search, demonstrating multi-language capability):

Flarum forum dashboard showing search results powered by MeilisearchFlarum forum dashboard showing search results powered by Meilisearch

Meilisearch provides developers with a powerful yet flexible search solution, particularly well-suited for applications needing fast, relevant, and easy-to-implement search functionality. Through this tutorial, we've explored Meilisearch's core features, its installation and configuration process (including a convenient one-click Sealos deployment), and how to integrate it into a real-world application like Flarum.

We encourage you to further explore Meilisearch's advanced features, such as custom ranking rules, synonym configurations, and filtering options, to fully leverage its potential. Keep an eye on the official Meilisearch documentation and community updates for the latest features and best practices. Happy searching!