meilisearch
A lightning-fast search API that fits effortlessly into your apps, websites, and workflow
Top Related Projects
⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
Free and Open Source, Distributed, RESTful Search Engine
Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.
ZincSearch . A lightweight alternative to elasticsearch that requires minimal resources, written in Go.
A full-text search engine in rust
Quick Overview
Meilisearch is an open-source, lightning-fast, and highly customizable search engine. It is designed to provide a powerful and user-friendly search experience for websites and applications, with features like typo tolerance, faceted search, and custom ranking rules.
Pros
- Extremely fast search performance, even with large datasets
- Easy to set up and use, with a RESTful API and various language-specific SDKs
- Highly customizable, allowing fine-tuning of search relevance and ranking
- Supports multiple languages and offers built-in typo tolerance
Cons
- Relatively new compared to some established search engines like Elasticsearch
- Limited advanced features compared to more mature search solutions
- Requires more memory compared to some lightweight alternatives
- Documentation can be sparse for some advanced use cases
Code Examples
- Basic search query using the JavaScript SDK:
import { MeiliSearch } from 'meilisearch'
const client = new MeiliSearch({ host: 'http://localhost:7700' })
const index = client.index('movies')
const search = await index.search('inception')
console.log(search.hits)
- Adding documents to an index:
const documents = [
{ id: 1, title: 'Inception', director: 'Christopher Nolan' },
{ id: 2, title: 'Interstellar', director: 'Christopher Nolan' }
]
await index.addDocuments(documents)
- Configuring custom ranking rules:
await index.updateRankingRules([
'words',
'typo',
'proximity',
'attribute',
'sort',
'exactness',
'release_date:desc',
'popularity:desc'
])
Getting Started
To get started with Meilisearch:
-
Install Meilisearch:
curl -L https://install.meilisearch.com | sh
-
Run Meilisearch:
./meilisearch
-
Install a client SDK (e.g., JavaScript):
npm install meilisearch
-
Initialize the client and perform a search:
import { MeiliSearch } from 'meilisearch' const client = new MeiliSearch({ host: 'http://localhost:7700' }) const index = client.index('movies') // Add documents await index.addDocuments([ { id: 1, title: 'Inception', year: 2010 }, { id: 2, title: 'Interstellar', year: 2014 } ]) // Perform a search const search = await index.search('inception') console.log(search.hits)
Competitor Comparisons
⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
Pros of InstantSearch
- Extensive UI component library for building search interfaces
- Supports multiple frameworks (React, Vue, Angular, JavaScript)
- Well-documented with numerous examples and tutorials
Cons of InstantSearch
- Requires Algolia backend, which can be costly for large-scale applications
- Less flexible for custom search algorithms or data structures
- Steeper learning curve for complex customizations
Code Comparison
InstantSearch (React):
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch-dom';
const App = () => (
<InstantSearch indexName="your_index" searchClient={searchClient}>
<SearchBox />
<Hits />
</InstantSearch>
);
Meilisearch (JavaScript):
const client = new MeiliSearch({ host: 'http://localhost:7700' });
const index = client.index('movies');
const search = async (query) => {
const results = await index.search(query);
// Handle results
};
Key Differences
- InstantSearch focuses on UI components, while Meilisearch is a backend search engine
- Meilisearch offers more control over search algorithms and ranking
- InstantSearch provides a quicker setup for standard search interfaces
- Meilisearch is self-hosted and open-source, offering more flexibility in deployment and customization
Both solutions have their strengths, with InstantSearch excelling in rapid UI development and Meilisearch providing more backend control and customization options.
Free and Open Source, Distributed, RESTful Search Engine
Pros of Elasticsearch
- More mature and feature-rich, with advanced analytics and machine learning capabilities
- Highly scalable and distributed architecture for handling large-scale data
- Extensive ecosystem with plugins, integrations, and community support
Cons of Elasticsearch
- Steeper learning curve and more complex setup process
- Higher resource requirements and potentially more expensive to operate
- Requires more configuration and tuning for optimal performance
Code Comparison
Elasticsearch query:
{
"query": {
"match": {
"title": "search engine"
}
}
}
Meilisearch query:
{
"q": "search engine",
"attributesToRetrieve": ["title"]
}
Both Elasticsearch and Meilisearch are powerful search engines, but they cater to different use cases. Elasticsearch excels in complex, large-scale deployments with advanced analytics needs, while Meilisearch focuses on simplicity and ease of use for smaller to medium-sized applications.
Elasticsearch offers more flexibility and customization options, making it suitable for diverse scenarios. However, this comes at the cost of increased complexity and resource requirements. Meilisearch, on the other hand, provides a more straightforward setup and faster out-of-the-box performance for basic search functionality.
The code comparison demonstrates the difference in query syntax, with Elasticsearch using a more structured JSON format and Meilisearch opting for a simpler key-value approach. This reflects the overall philosophy of each project, with Elasticsearch prioritizing flexibility and Meilisearch emphasizing simplicity.
Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
Pros of Typesense
- Faster indexing and search performance for certain use cases
- Built-in support for geosearch and vector search
- More flexible schema definition and field types
Cons of Typesense
- Smaller community and ecosystem compared to MeiliSearch
- Less extensive documentation and learning resources
- Fewer integrations with third-party tools and frameworks
Code Comparison
Typesense query example:
client.collections['books'].search({
'q': 'harry potter',
'query_by': 'title,author',
'sort_by': 'ratings_count:desc'
})
MeiliSearch query example:
index.search('harry potter', {
'attributesToSearchOn': ['title', 'author'],
'sort': ['ratings_count:desc']
})
Both Typesense and MeiliSearch offer similar query capabilities, with slight differences in syntax and parameter naming. Typesense uses 'query_by' for specifying searchable fields, while MeiliSearch uses 'attributesToSearchOn'. The sorting syntax is also slightly different, with Typesense using 'sort_by' and MeiliSearch using 'sort'.
Overall, both search engines provide powerful and flexible search capabilities, with Typesense offering some additional features like geosearch and vector search out of the box, while MeiliSearch benefits from a larger community and more extensive documentation.
🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.
Pros of Sonic
- Lightweight and fast, with minimal resource usage
- Simple setup and configuration process
- Supports multiple programming languages through its protocol
Cons of Sonic
- Limited advanced features compared to Meilisearch
- Smaller community and ecosystem
- Less comprehensive documentation
Code Comparison
Sonic (search query):
let results = channel.query("collection", "bucket", "hello world", Some(10), None);
Meilisearch (search query):
let results = client.index("movies").search().with_query("hello world").execute().await?;
Both Sonic and Meilisearch are search engines, but they have different focuses. Sonic aims to be a lightweight, fast, and simple solution, while Meilisearch offers more advanced features and a more comprehensive search experience.
Sonic is ideal for projects that require basic search functionality with minimal resource usage. It's easy to set up and supports multiple programming languages through its protocol.
Meilisearch, on the other hand, provides more advanced features like typo tolerance, highlighting, and faceted search. It has a larger community and more extensive documentation, making it suitable for more complex search requirements.
In terms of code, both engines offer relatively simple query interfaces, but Meilisearch's API tends to be more feature-rich and flexible.
ZincSearch . A lightweight alternative to elasticsearch that requires minimal resources, written in Go.
Pros of ZincSearch
- Written in Go, potentially offering better performance and lower resource usage
- Simpler setup and configuration, with a single binary deployment
- Supports a wider range of data sources out of the box, including S3 and GCS
Cons of ZincSearch
- Less mature project with fewer features compared to MeiliSearch
- Smaller community and ecosystem, which may result in fewer integrations and plugins
- Limited advanced search capabilities, such as typo tolerance and custom ranking rules
Code Comparison
MeiliSearch configuration example:
{
"indexUid": "movies",
"primaryKey": "id",
"searchableAttributes": ["title", "description"],
"filterableAttributes": ["genre", "year"]
}
ZincSearch configuration example:
{
"name": "movies",
"storage_type": "disk",
"shard_num": 1,
"mappings": {
"properties": {
"title": {"type": "text", "index": true},
"description": {"type": "text", "index": true},
"genre": {"type": "keyword", "index": true},
"year": {"type": "integer", "index": true}
}
}
}
Both projects aim to provide fast and efficient search capabilities, but they differ in their approach and feature set. MeiliSearch offers more advanced search features and a larger ecosystem, while ZincSearch focuses on simplicity and broader data source support.
A full-text search engine in rust
Pros of Toshi
- Written in Rust, potentially offering better performance and memory safety
- Designed with distributed systems in mind, allowing for horizontal scaling
- Supports more advanced query types, including regex and fuzzy searches
Cons of Toshi
- Less mature project with fewer contributors and community support
- Limited documentation and examples compared to Meilisearch
- Fewer built-in features and integrations out of the box
Code Comparison
Meilisearch (JavaScript client):
const { MeiliSearch } = require('meilisearch')
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
apiKey: 'masterKey',
})
const index = client.index('movies')
Toshi (Rust client):
use toshi_client::Client;
let client = Client::new("http://localhost:8080")?;
let index = client.index("movies")?;
Both projects aim to provide fast and efficient search capabilities, but they differ in their implementation and target use cases. Meilisearch focuses on simplicity and ease of use, making it a good choice for smaller projects or those new to search engines. Toshi, on the other hand, is designed for larger-scale distributed systems and offers more advanced features, but requires more setup and configuration.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Website | Roadmap | Meilisearch Cloud | Blog | Documentation | FAQ | Discord
â¡ A lightning-fast search engine that fits effortlessly into your apps, websites, and workflow ð
Meilisearch helps you shape a delightful search experience in a snap, offering features that work out of the box to speed up your workflow.
ð¥ Examples
- Movies â An application to help you find streaming platforms to watch movies using hybrid search.
- Ecommerce â Ecommerce website using disjunctive facets, range and rating filtering, and pagination.
- Songs â Search through 47 million of songs.
- SaaS â Search for contacts, deals, and companies in this multi-tenant CRM application.
See the list of all our example apps in our demos repository.
⨠Features
- Hybrid search: Combine the best of both semantic & full-text search to get the most relevant results
- Search-as-you-type: Find & display results in less than 50 milliseconds to provide an intuitive experience
- Typo tolerance: get relevant matches even when queries contain typos and misspellings
- Filtering and faceted search: enhance your users' search experience with custom filters and build a faceted search interface in a few lines of code
- Sorting: sort results based on price, date, or pretty much anything else your users need
- Synonym support: configure synonyms to include more relevant content in your search results
- Geosearch: filter and sort documents based on geographic data
- Extensive language support: search datasets in any language, with optimized support for Chinese, Japanese, Hebrew, and languages using the Latin alphabet
- Security management: control which users can access what data with API keys that allow fine-grained permissions handling
- Multi-Tenancy: personalize search results for any number of application tenants
- Highly Customizable: customize Meilisearch to your specific needs or use our out-of-the-box and hassle-free presets
- RESTful API: integrate Meilisearch in your technical stack with our plugins and SDKs
- AI-ready: works out of the box with langchain and the model context protocol
- Easy to install, deploy, and maintain
ð Documentation
You can consult Meilisearch's documentation at meilisearch.com/docs.
ð Getting started
For basic instructions on how to set up Meilisearch, add documents to an index, and search for documents, take a look at our documentation guide.
ð Supercharge your Meilisearch experience
Say goodbye to server deployment and manual updates with Meilisearch Cloud. Additional features include analytics & monitoring in many regions around the world. No credit card is required.
ð§° SDKs & integration tools
Install one of our SDKs in your project for seamless integration between Meilisearch and your favorite language or framework!
Take a look at the complete Meilisearch integration list.
âï¸ Advanced usage
Experienced users will want to keep our API Reference close at hand.
We also offer a wide range of dedicated guides to all Meilisearch features, such as filtering, sorting, geosearch, API keys, and tenant tokens.
Finally, for more in-depth information, refer to our articles explaining fundamental Meilisearch concepts such as documents and indexes.
ð Telemetry
Meilisearch collects anonymized user data to help us improve our product. You can deactivate this whenever you want.
To request deletion of collected data, please write to us at privacy@meilisearch.com. Remember to include your Instance UID
in the message, as this helps us quickly find and delete your data.
If you want to know more about the kind of data we collect and what we use it for, check the telemetry section of our documentation.
ð« Get in touch!
Meilisearch is a search engine created by Meili, a software development company headquartered in France and with team members all over the world. Want to know more about us? Check out our blog!
ð Subscribe to our newsletter if you don't want to miss any updates! We promise we won't clutter your mailbox: we only send one edition every two months.
ð Want to make a suggestion or give feedback? Here are some of the channels where you can reach us:
- For feature requests, please visit our product repository
- Found a bug? Open an issue!
- Want to be part of our Discord community? Join us!
Thank you for your support!
ð©âð» Contributing
Meilisearch is, and will always be, open-source! If you want to contribute to the project, please look at our contribution guidelines.
ð¦ Versioning
Meilisearch releases and their associated binaries are available on the project's releases page.
The binaries are versioned following SemVer conventions. To know more, read our versioning policy.
Differently from the binaries, crates in this repository are not currently available on crates.io and do not follow SemVer conventions.
Top Related Projects
⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
Free and Open Source, Distributed, RESTful Search Engine
Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.
ZincSearch . A lightweight alternative to elasticsearch that requires minimal resources, written in Go.
A full-text search engine in rust
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot