PATCH /network on the leader instance.
Add a remote
Include the new remote in theremotes object. Remotes not present in the request are left unchanged:
addRemotes inside a shard definition to add the new remote to an existing shard without rewriting the full shard assignment.
Remove a remote
Set a remote tonull to remove it from the network. This also removes the remote from all shard assignments:
NetworkTopologyChange task that rebalances documents across the remaining remotes.
The removed instance still retains its local data after being removed from the network. It is no longer part of the cluster and will not receive new documents or participate in searches.
Update shard assignments
You can also useremoveRemotes inside a shard definition to remove a remote from a specific shard.
To fully replace the shard assignment, send a new shards configuration with the remotes list:
Filter searches by shard
Target specific shards using the_shard filter in search requests:
_shard filter operators:
| Syntax | Behavior |
|---|---|
_shard = "shard-a" | Results from shard-a only |
_shard != "shard-a" | Results from all shards except shard-a |
_shard IN ["shard-a", "shard-b"] | Results from both shard-a and shard-b |
Private network security
By default, Meilisearch blocks requests to non-global IP addresses. If your instances communicate over a private network, configure the--experimental-allowed-ip-networks flag on each instance:
Next steps
Replication and sharding overview
Understand the concepts behind sharding, replication, and network search.
Deployment overview
Deploy Meilisearch to production on various cloud providers.