Prefix search

    In Meilisearch, you can perform a search with only a single letter as your query. This is because we follow the philosophy of prefix search.

    Prefix search is when document sorting starts by comparing the search query against the beginning of each word in your dataset. All documents with words that match the query term are added to the bucket sort, before the ranking rules are applied sequentially.

    In other words, prefix search means that it's not necessary to type a word in its entirety to find documents containing that word—you can just type the first one or two letters.

    Prefix search is only performed on the last word in a search query—prior words must be typed out fully to get accurate results.

    Searching by prefix (rather than using complete words) has a significant impact on search time. The shorter the query term, the more possible matches in the dataset.

    Example

    Given a set of words in a dataset:

    film cinema movies show harry potter shine musical

    query: s: response:

    but not

    query: sho: response:

    Meilisearch also handles typos while performing the prefix search. You can read more about the typo rules on the dedicated page.