In this tutorial you will see how to perform a query searching multiple indexes at the same time to obtain a single list of results.
/multi-search
endpoint. A federated search is a multi-search that returns results from multiple queries in a single list.
In this tutorial you will see how to create separate indexes containing different types of data from a CRM application. You will then perform a query searching all these indexes at the same time to obtain a single list of results.
crm-chats.json
, crm-profiles.json
, and crm-tickets.json
containing data from a fictional CRM application.
Add the datasets to Meilisearch and create three separate indexes, profiles
, chats
, and tickets
:
/multi-search
endpoint with the federation
parameter to query the three indexes simultaneously:
profiles
index.
Use the weight
property of the federation
parameter to boost results coming from a specific query:
profile
ranking higher than documents from other queries:
weight
to boost results from the index most likely to contain the information you wanted.