How to build an AI-powered search experience using Melis Search

by SkillAiNest

Search is one of the most important features in modern applications. Users expect quick answers, helpful suggestions, and results that match their intent even when they make spelling mistakes.

Most traditional search systems struggle to deliver this experience without complex and heavy infrastructure.

mailisearch is an open-source search engine that changes that by offering a fast and developer-friendly engine that’s easy to configure and extend.

When you combine MeliSearch with AI models for natural language understanding and Semantic compatibilityyou can create a powerful and intuitive search experience that feels modern and intelligent.

This article explains how Miles Search works, how to configure it, and how to integrate an AI model to deliver better relevancy and better rankings. You’ll also see how hybrid search and semantic embedding work, and how MailSearch can be deployed in the cloud using Siola.

What we will cover

Understanding meilisearch

Melis Search is a lightning fast search engine that fits easily into any application.

It is built in rust and designed to deliver results in less than fifty seconds. It supports semantic search, hybrid search, type tolerance, sorting, geosearch, and many different languages.

Mailsearch also provides a clean and comfortable API and a wide range of SDKs that facilitate integration with JavaScript, Python, GO, PHP, Ruby, Rust and various other languages.

You can try Melis search by searching for it Official demo. These demos show how Mailis Search is not limited to a specific use case but can fit many types of workflows.

Malice Search supported two editions. The Community Edition is fully open source under the MIT License and can be freely used for commercial products as well.

The Enterprise edition offered such features sharding And running under a commercial license. You can deploy Mailsearch yourself or choose Mailsearch Cloud, which handles hosting, updates, monitoring and analytics without the need for server maintenance.

Setting up mailisearch

Starting a Melis search is easy. You can download the binary and run it directly or you can launch it via docker. Running through Docker is the fastest way to test on your machine.

docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest

Once the server is running, you can communicate with it using HTTP. The simplest use case is to index and query documents. Here is an example using Python:

import requests

docs = (
    {"id": 1, "title": "AI in Finance", "text": "How AI is changing banks"},
    {"id": 2, "title": "AI in Law", "text": "How AI helps legal teams"},
)
requests.put(
    "http://localhost:7700/indexes/articles/documents",
    json=docs
)

It’s just as easy to find.

import requests

query = "ai banks"
res = requests.post(
    "http://localhost:7700/indexes/articles/search",
    json={"q": query}
)
print(res.json())

The engine returns results in milliseconds. Type tolerance, word proximity and relevance ranking work out of the box.

Malice Search automatically handles synonyms if you configure them and allow custom sorting rules for attributes such as price or date. It also supports faces, filters, and geos search, making it suitable for e-commerce, travel apps, real estate listings, and data-heavy dashboards.

Using hybrid search and AI together

Hybrid search combines full text search with semantic vector search.

Melis supports semantic search by search vector fields and enables the combination of both approaches. This helps you serve users who type ambiguous queries or natural language queries.

AI provides the model Embedding It captures meaning, while Malicious Search handles fast retrieval and ranking.

To add semantic search, you first create an embedding for your documents using an AI model. Here’s a simple example using OpenIM embeddings:

from openai import OpenAI
import requests

client = OpenAI()
def embed(text):
    out = client.embeddings.create(
        model="text-embedding-3-small",
        input=text
    )
    return out.data(0).embedding
doc = {
    "id": 3,
    "title": "AI in Insurance",
    "text": "How AI powers underwriting",
    "vector": embed("How AI powers underwriting")
}
requests.put(
    "http://localhost:7700/indexes/articles/documents",
    json=(doc)
)

When the user searches, you embed the query and calculate the match. You can find this with the keyword search results returned by Malice Search. Combined classification creates a better experience than either approach.

Using AI to rewrite queries

Users often type incomplete or unstructured questions. They might type “How does AI help banks?” Instead of keywords.

You can use the AI ​​model to rewrite it into something more search-friendly. Query rewriting produces better results in Malice search while respecting the user’s original intent.

from openai import OpenAI
import requests

client = OpenAI()
def rewrite_query(user_query):
    prompt = f"Rewrite this for search: {user_query}"
    out = client.chat.completions.create(
        model="gpt-4o-mini",
        messages=({"role": "user", "content": prompt})
    )
    return out.choices(0).message.content
user_query = "how does ai help banks"
rewritten = rewrite_query(user_query)
res = requests.post(
    "http://localhost:7700/indexes/articles/search",
    json={"q": rewritten}
)
print(res.json())

This pattern improves the accuracy of query-based searches in blogs, documentation platforms, and knowledge bases. You can use it to normalize queries, remove ambiguous text, add synonyms, and correct spelling errors before they reach MeliSearch.

Deploying MeliSearch in the cloud using Seola

You can deploy Mailis Search anywhere. It runs inside a small server, local machine, or containers.

Self-hosting gives you complete control and is generally preferred by technical teams who want to keep sensitive data in-house. You can choose any cloud provider, such as AWS, Digitalisan, or others, to set up MeliSearch. But I will use Siola.

Seoul is a PAAS provider designed for developers and dev teams to consistently ship features and updates in the most efficient manner. It offers application hosting, database, object storage, and static site hosting for your projects.

I’m using Siola for two reasons:

  • Each platform will charge you to create a cloud resource. Siola comes with a $50 credit for our use, so we won’t incur any costs for this instance.

  • Seoul has one Template for Milesearchso it simplifies the manual installation and setup for each resource you’ll need to install.

Login Click on Seela and Templates. You can see Mailsearch as one of the templates. Click Deploy.

Seoul Template

You will see that resources are being provisioned for the application.

Seoul deployment

Once the configuration is complete, click “View App”.

Malicious search in production

You now have a production-grade Mailsearch server running on the cloud. You can use it to set up an index for your database and use JavaScript or other SDKs to communicate with Mailsearch.

This is Complete list of APIs Powered by Melis Search.

The result

Melis Search gives you a fast and elegant base for searching. AI models incorporate understanding and personalization. When these two work together, you get a search experience that feels immediate, adaptive, and intelligent.

You can start small with keyword searches and then add in query rewriting, embedding, hybrid searches, and refactoring. You can also use suggestions, synonyms and filters to improve the user journey.

With its simple API, broad language support, and robust ecosystem, Mailis makes it easy to find searches that feel right at home in any modern app.

Hope you enjoyed this article. find me LinkedIn or Visit my website.

You may also like

Leave a Comment

At Skillainest, we believe the future belongs to those who embrace AI, upgrade their skills, and stay ahead of the curve.

Get latest news

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

@2025 Skillainest.Designed and Developed by Pro