/network
route to create a network of Meilisearch instances. This is particularly useful when used together with federated search to implement horizontal database partition strategies such as sharding.
This is an experimental feature. Use the Meilisearch Cloud UI or the experimental features endpoint to activate it:
If an attribute is both:
- not on the
displayedAttributes
list - present on the
sortableAttributes
/network
endpoint.Do not enable the network
feature if you rely on the value of attributes not present in displayedAttributes
to remain hidden at all times.The network object
self
Type: StringDefault value:
null
Description: A string indicating the name of the current instance
sharding
Type: BooleanDefault value:
false
Description: A boolean indicating whether sharding should be enabled on the network
remotes
Type: ObjectDefault value:
{}
Description: An object containing remote objects. The key of each remote object indicates the name of the remote instance
The remote object
url
Type: StringDefault value:
null
Description: URL indicating the address of a Meilisearch instance. This URL does not need to be public, but must be accessible to all instances in the network. Required
searchApiKey
Type: StringDefault value:
null
Description: An API key with search permissions
writeApiKey
Type: StringDefault value:
null
Description: An API key with
documents.*
permissions
Get the network object
GET
/network
Example
Response: 200 Ok
Update the network object
PATCH
/network
self
and remotes
fields of the network object.
Updates to the network object are partial. Only provide the fields you intend to update. Fields not present in the payload will remain unchanged.
To reset self
, sharding
and remotes
to their original value, set them to null
. To remove a single remote
from your network, set the value of its name to null
.
Body
Name | Type | Default value | Description |
---|---|---|---|
self | String | null | The name of the current instance |
sharding | Boolean | false | Whether sharding should be enabled on the network |
remotes | String | null | A list of remote objects describing accessible Meilisearch instances |