Search
MeiliSearch has been designed to improve your search experience.
Today, finding a high-quality search engine may be complicated. Because we realized there was a lack of both powerful and simple solutions, we decided to create MeiliSearch. The simplicity of use is our philosophy and it keeps driving the development of MeiliSearch.
Simple and Intuitive
We aimed for a simple and intuitive experience for both developers and end-users.
For developers, it requires very little configuration to be up and running. Communication to the server is done through a RESTful API.
For users, the search experience aims to feel simple so they can focus on the results. MeiliSearch delivers an intuitive search-as-you-type experience; which means a response time lower than 50 milliseconds.
Highly Customizable
MeiliSearch works out-of-the-box with default settings that meet the needs of most projects.
However, searching is highly customizable.
It would not be a search engine if there wasn’t a notion of relevancy in the results returned.
The returned results are sorted according to a set of consecutive rules called ranking rules. You can delete existing rules, add new ones, or even change the order in which they are executed.
You can also configure the search parameters to refine your search even further. We support filters and faceting.
Features
MeiliSearch in action with
batman
andjoker
being defined as synonyms.
All of MeiliSearch’s features are provided out-of-the-box and can be easily configured. Here is a few of them that you should try out:
Search as you type
Also called instant search, results are displayed while you are still inputting your query. Showed results are changed in real-time whenever you type additional text in the search box.
Typo tolerance
Instead of letting typos ruin your search experience, MeiliSearch will find the results you expect.
Read more about typo tolerance in this dedicated guide.
Synonyms
Search should not be limited by some specific words.
Read more about synonyms in this dedicated guide.
Languages support
MeiliSearch supports Latin-based languages, English, and Kanji characters.
Highlighting
Search results can contain highlighted queried terms to further enhance usability. Users don’t need to read the entire text. The terms are highlighted and thus catch their eye.
Filters
Meilisearch allows you to define filters so you can filter through the results based on criteria.
Faceting
Faceted search is a feature provided out-of-the-box by MeiliSearch. It allows you to classify search results into categories and to build intuitive navigation interfaces.
Placeholder Search
If you make a search without inputting any query words, MeiliSearch will return all the documents in that index sorted by its custom ranking rules. This feature is called placeholder search. It is particularly effective when used with other features such as faceting or filtering, which allow users to narrow their searches and browse by category.
Placeholder search is not affected by MeiliSearch’s default ranking rules—only custom rules added by a user. If no custom rules have been set, the results are displayed in the order of their internal database position.
Examples
Here are a few examples of what can be achieved with the search parameters:
Results can be paginated using the limit
and offset
query parameters.
$ curl 'http://localhost:7700/indexes/movies/search' \
--data '{ "q": "shifu", "limit": 5, "offset": 10 }'
client.index('movies').search('shifu', {
limit: 5,
offset: 10
})
client.index('movies').search('shifu', {
'limit': 5,
'offset': 10
})
$client->index('movies')->search('shifu', ['limit' => 5, 'offset' => 10]);
index.search('shifu', {
limit: 5,
offset: 10
})
results, error := client.Search("movies").Search(meilisearch.SearchRequest{
Query: "shifu",
Limit: 5,
Offset: 10,
})
let results: SearchResults<Movie> = movies.search()
.with_query("shifu")
.with_limit(5)
.with_offset(10)
.execute()
.await
.unwrap();
You can filter results using the filters
query parameter.
$ curl 'http://localhost:7700/indexes/movies/search' \
--data '{ "q": "Avengers", "filters": "release_date > 795484800" }'
client.index('movies').search('Avengers', {
filters: 'release_date > 795484800',
})
client.index('movies').search('Avengers', {
'filters': 'release_date > 795484800'
})
$client->index('movies')->search('Avengers', ['filters' => 'release_date > 795484800']);
index.search('Avengers', {
filters: 'release_date > 795484800'
})
results, error := client.Search("movies").Search(meilisearch.SearchRequest{
Query: "Avengers",
Filters: "release_date > \"795484800\"",
})
let results: SearchResults<Movie> = movies.search()
.with_query("Avengers")
.with_filters("release_date > 795484800")
.execute()
.await
.unwrap();
Give it a try!
Instead of showing you examples, why not just invite you to test MeiliSearch interactively in the out-of-the-box web interface we deliver?
There’s no need to write a single line of front-end code. All you need to do is follow this guide to give the search engine a try!