Configuration object
Create a new index
The index UID
Optional
options: IndexOptionsIndex options
Promise returning Index instance
Create one API key
Key options
Promise returning a key
Delete an index
The index UID
Promise which resolves when index is deleted successfully
Deletes an index if it already exists.
The index UID
Promise which resolves to true when index exists and is deleted successfully, otherwise false if it does not exist
Delete one API key
Key
Get all the indexes as Index instances.
Optional
parameters: PaginationParameters to browse the indexes
Promise returning array of raw index information
Get one API key
Key or uid of the API key
Promise returning a key
Get all API keys
Optional
parameters: PaginationParameters to browse the indexes
Promise returning an object with keys
Experimental
Gather information about an index by calling MeiliSearch and return the raw JSON response
The index UID
Promise returning index information
Get all the indexes in their raw value (no Index instances).
Optional
parameters: PaginationParameters to browse the indexes
Promise returning array of raw index information
Get the version of MeiliSearch
Promise returning object with version details
Checks if the server is healthy, otherwise an error will be thrown.
Promise returning an object with health details
Checks if the server is healthy, return true or false.
Promise returning a boolean
Perform multiple search queries.
It is possible to make multiple search queries on the same index or on different ones. With network feature enabled, you can also search across remote instances.
Search queries
Optional
extraRequestInit: ExtraRequestInitAdditional request configuration options
Promise containing the search responses
client.multiSearch({
queries: [
{ indexUid: "movies", q: "wonder" },
{ indexUid: "books", q: "flower" },
],
});
// Federated search with remote instance (requires network feature enabled)
client.multiSearch({
federation: {},
queries: [
{
indexUid: "movies",
q: "wonder",
federationOptions: {
remote: "meilisearch instance name",
},
},
{
indexUid: "movies",
q: "wonder",
federationOptions: {
remote: "meilisearch instance name",
},
},
],
});
Swaps a list of index tuples.
List of indexes tuples to swap.
Promise returning object of the enqueued task
Update an index
The index UID
Optional
options: IndexOptionsIndex options to update
Promise returning Index instance after updating
Creates new MeiliSearch instance