Add or replace multiples documents to an index
+Array of Document objects to add/replace
+Optional
options: DocumentOptionsOptions on document addition
+Promise containing an EnqueuedTask
+Add or replace multiples documents in a string format to an index. It only +supports csv, ndjson and json formats.
+Documents provided in a string to add/replace
+Content type of your document: + 'text/csv'|'application/x-ndjson'|'application/json'
+Optional
queryParams: RawDocumentAdditionOptionsPromise containing an EnqueuedTask
+Add or replace multiples documents to an index in batches
+Array of Document objects to add/replace
+Size of the batch
+Optional
options: DocumentOptionsOptions on document addition
+Promise containing array of enqueued task objects for each batch
+Delete an index.
+Promise which resolves when index is deleted successfully
+Delete all documents of an index
+Promise containing an EnqueuedTask
+Delete one document
+Id of Document to delete
+Promise containing an EnqueuedTask
+Delete multiples documents of an index.
+Params value can be:
+Promise containing an EnqueuedTask
+Get documents of an index.
+Parameters to browse the documents. Parameters can
+ contain the filter
field only available in Meilisearch v1.2 and newer
Promise containing the returned documents
+Get the localized attributes settings.
+Promise containing object of localized attributes settings
+Get the pagination settings.
+Promise containing object of pagination settings
+Get the proximity precision settings of a Meilisearch index.
+Promise containing the proximity precision settings
+Get index information.
+Promise containing index information
+Get the SearchCutoffMs settings.
+Promise containing object of SearchCutoffMs settings
+Get stats of an index
+Promise containing object with stats of the index
+Get the list of all the tasks of the index.
+Parameters to browse the tasks
+Promise containing all tasks
+Get the typo tolerance settings.
+Promise containing the typo tolerance settings.
+Reset the dictionary settings to its default value
+Promise containing an EnqueuedTask
+Reset the displayed-attributes.
+Promise containing an EnqueuedTask
+Reset the distinct-attribute.
+Promise containing an EnqueuedTask
+Reset the embedders settings to its default value
+Promise containing an EnqueuedTask
+Reset the faceting settings.
+Promise containing an EnqueuedTask
+Reset the filterable-attributes.
+Promise containing an EnqueuedTask
+Reset the localized attributes settings.
+Promise containing an EnqueuedTask
+Reset the non-separator tokens list to its default value
+Promise containing an EnqueuedTask
+Reset the pagination settings.
+Promise containing an EnqueuedTask
+Reset the proximity precision settings to its default value
+Promise containing an EnqueuedTask
+Reset the ranking rules list to its default value
+Promise containing an EnqueuedTask
+Reset the SearchCutoffMs settings.
+Promise containing an EnqueuedTask
+Reset the searchable-attributes.
+Promise containing an EnqueuedTask
+Reset the separator tokens list to its default value
+Promise containing an EnqueuedTask
+Reset settings.
+Promise containing an EnqueuedTask
+Reset the sortable-attributes.
+Promise containing an EnqueuedTask
+Reset the stop-words list to be empty again
+Promise containing an EnqueuedTask
+Reset the synonym list to be empty again
+Promise containing an EnqueuedTask
+Reset the typo tolerance settings.
+Promise containing object of the enqueued update
+Search for documents into an index
+Optional
query: null | stringQuery string
+Optional
options: SSearch options
+Optional
config: Partial<Request>Additional request configuration options
+Promise containing the search response
+Search for facet values
+Parameters used to search on the facets
+Optional
config: Partial<Request>Additional request configuration options
+Promise containing the search response
+Search for documents into an index using the GET method
+Optional
query: null | stringQuery string
+Optional
options: SSearch options
+Optional
config: Partial<Request>Additional request configuration options
+Promise containing the search response
+Search for similar documents
+Parameters used to search for similar documents
+Promise containing the search response
+Update an index.
+Data to update
+Promise to the current Index object with updated information
+Update the dictionary settings. Overwrite the old settings.
+Array that contains the new dictionary settings.
+Promise containing an EnqueuedTask or null
+Update the displayed-attributes.
+Array of strings that contains attributes of + an index to display
+Promise containing an EnqueuedTask
+Update the distinct-attribute.
+Field name of the distinct-attribute
+Promise containing an EnqueuedTask
+Add or update multiples documents to an index
+Array of Document objects to add/update
+Optional
options: DocumentOptionsOptions on document update
+Promise containing an EnqueuedTask
+This is an EXPERIMENTAL feature, which may break without a major version. +It's available after Meilisearch v1.10.
+More info about the feature: +https://github.com/orgs/meilisearch/discussions/762 More info about +experimental features in general: +https://www.meilisearch.com/docs/reference/api/experimental-features
+Object containing the function string and related options
+Promise containing an EnqueuedTask
+Add or update multiples documents in a string format to an index. It only +supports csv, ndjson and json formats.
+Documents provided in a string to add/update
+Content type of your document: + 'text/csv'|'application/x-ndjson'|'application/json'
+Optional
queryParams: RawDocumentAdditionOptionsOptions on raw document addition
+Promise containing an EnqueuedTask
+Add or update multiples documents to an index in batches
+Array of Document objects to add/update
+Size of the batch
+Optional
options: DocumentOptionsOptions on document update
+Promise containing array of enqueued task objects for each batch
+Update the embedders settings. Overwrite the old settings.
+Object that contains the new embedders settings.
+Promise containing an EnqueuedTask or null
+Update the faceting settings.
+Faceting index settings object
+Promise containing an EnqueuedTask
+Update the filterable-attributes.
+Array of strings containing the attributes + that can be used as filters at query time
+Promise containing an EnqueuedTask
+Update the localized attributes settings.
+Localized attributes object
+Promise containing an EnqueuedTask
+Update the list of non-separator tokens. Overwrite the old list.
+Array that contains non-separator tokens.
+Promise containing an EnqueuedTask or null
+Update the pagination settings.
+Pagination object
+Promise containing an EnqueuedTask
+Update the proximity precision settings. Overwrite the old settings.
+String that contains the new proximity + precision settings.
+Promise containing an EnqueuedTask or null
+Update the list of ranking-rules. Overwrite the old list.
+Array that contain ranking rules sorted by order of + importance.
+Promise containing an EnqueuedTask
+Update the SearchCutoffMs settings.
+Object containing SearchCutoffMsSettings
+Promise containing an EnqueuedTask
+Update the searchable-attributes.
+Array of strings that contains searchable + attributes sorted by order of importance(most to least important)
+Promise containing an EnqueuedTask
+Update the list of separator tokens. Overwrite the old list.
+Array that contains separator tokens.
+Promise containing an EnqueuedTask or null
+Update all settings Any parameters not provided will be left unchanged.
+Object containing parameters with their updated values
+Promise containing an EnqueuedTask
+Update the sortable-attributes.
+Array of strings containing the attributes that + can be used to sort search results at query time
+Promise containing an EnqueuedTask
+Update the list of stop-words. Overwrite the old list.
+Array of strings that contains the stop-words.
+Promise containing an EnqueuedTask
+Update the list of synonyms. Overwrite the old list.
+Mapping of synonyms with their associated words
+Promise containing an EnqueuedTask
+Update the typo tolerance settings.
+Object containing the custom typo tolerance + settings.
+Promise containing object of the enqueued update
+Wait for a task to be processed.
+Task identifier
+Options on timeout and interval
+Promise containing an array of tasks
+Wait for multiple tasks to be processed.
+Tasks identifier
+Options on timeout and interval
+Promise containing an array of tasks
+Static
createCreate an index.
+Unique identifier of the Index
+Index options
+Request configuration options
+Newly created Index object
+Cancel a list of enqueued or processing tasks.
+Parameters to filter the tasks.
+Promise containing an EnqueuedTask
+Creates a dump
+Promise returning object of the enqueued task
+Create a new index
+The index UID
+Index options
+Promise returning Index instance
+Create one API key
+Key options
+Promise returning a key
+Creates a snapshot
+Promise returning object of the enqueued task
+Delete an index
+The index UID
+Promise which resolves when index is deleted successfully
+Delete a list of tasks.
+Parameters to filter the tasks.
+Promise containing an EnqueuedTask
+Generate a tenant token
+The uid of the api key used as issuer of the token.
+Search rules that are applied to every search.
+Optional
options: TokenOptionsToken options to customize some aspect of the token.
+The token in JWT format.
+Get all the indexes as Index instances.
+Parameters to browse the indexes
+Promise returning array of raw index information
+Get all API keys
+Parameters to browse the indexes
+Promise returning an object with keys
+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).
+Parameters to browse the indexes
+Promise returning array of raw index information
+Get the list of all client tasks
+Parameters to browse the tasks
+Promise returning all tasks
+Perform multiple search queries.
+It is possible to make multiple search queries on the same index or on +different ones
+Search queries
+Optional
config: Partial<Request>Additional request configuration options
+Promise containing the search responses
+client.multiSearch({
queries: [
{ indexUid: 'movies', q: 'wonder' },
{ indexUid: 'books', q: 'flower' },
],
});
+
+Optional
config: Partial<Request>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
+Index options to update
+Promise returning Index instance after updating
+Wait for a task to be finished.
+Task identifier
+Options on timeout and interval
+Promise returning an array of tasks
+Wait for multiple tasks to be finished.
+Tasks identifier
+Options on timeout and interval
+Promise returning an array of tasks
+Optional
responseBody: MeiliSearchErrorResponseOptional
causeReadonly
responseOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Static
stackStatic
captureRest
...params: [message?: string, options?: ErrorOptions]Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Static
stackStatic
captureOptional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Static
stackStatic
captureOptional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Static
stackStatic
captureOptional
canceledOptional
deletedOptional
deletedOptional
displayedOptional
distinctOptional
filterableOptional
indexedOptional
matchedOptional
originalOptional
primaryOptional
providedOptional
rankingOptional
receivedOptional
searchableOptional
sortableOptional
stopOptional
swaps?: SwapIndexesParamsOptional
synonyms?: SynonymsCancel a list of enqueued or processing tasks.
+Parameters to filter the tasks.
+Promise containing an EnqueuedTask
+Delete a list tasks.
+Parameters to filter the tasks.
+Promise containing an EnqueuedTask
+Get tasks
+Parameters to browse the tasks
+Promise containing all tasks
+Wait for a task to be processed.
+Task identifier
+Additional configuration options
+Promise returning a task after it has been processed
+Waits for multiple tasks to be processed
+Tasks identifier list
+Wait options
+Promise returning a list of tasks after they have been processed
++ +
+ ++ + + + + + + + +
+ +⚡ The Meilisearch API client written for JavaScript
+ +Meilisearch JavaScript is the Meilisearch API client for JavaScript developers.
+Meilisearch is an open-source search engine. Learn more about Meilisearch.
+This readme and Meilisearch JS documentation website contains all the information you need to start using this Meilisearch SDK.
+For general information on how to use Meilisearch—such as our API reference, tutorials, guides, and in-depth articles—refer to our main documentation website.
+Say goodbye to server deployment and manual updates with Meilisearch Cloud. Get started with a 14-day free trial! No credit card required.
+We recommend installing meilisearch-js
in your project with your package manager of choice.
npm install meilisearch
+
+meilisearch-js
officially supports node
versions >= 14 and <= 18.
Instead of using a package manager, you may also import the library directly into your HTML via a CDN.
+To use one of our SDKs, you must first have a running Meilisearch instance. Consult our documentation for instructions on how to download and launch Meilisearch.
+After installing meilisearch-js
, you must import it into your application. There are many ways of doing that depending on your development environment.
import
syntax Usage in an ES module environment:
+import { MeiliSearch } from 'meilisearch'
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
apiKey: 'masterKey',
})
+
+<script>
tag Usage in an HTML (or alike) file:
+<script src='https://cdn.jsdelivr.net/npm/meilisearch@latest/dist/bundles/meilisearch.umd.js'></script>
<script>
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
apiKey: 'masterKey',
})
</script>
+
+require
syntax Usage in a back-end node.js or another environment supporting CommonJS modules:
+const { MeiliSearch } = require('meilisearch')
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
apiKey: 'masterKey',
})
+
+To use meilisearch-js
with React Native, you must also install react-native-url-polyfill.
Usage in a Deno environment:
+import { MeiliSearch } from "https://esm.sh/meilisearch"
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
apiKey: 'masterKey',
})
+
+const { MeiliSearch } = require('meilisearch')
// Or if you are in a ES environment
import { MeiliSearch } from 'meilisearch'
;(async () => {
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
apiKey: 'masterKey',
})
// An index is where the documents are stored.
const index = client.index('movies')
const documents = [
{ id: 1, title: 'Carol', genres: ['Romance', 'Drama'] },
{ id: 2, title: 'Wonder Woman', genres: ['Action', 'Adventure'] },
{ id: 3, title: 'Life of Pi', genres: ['Adventure', 'Drama'] },
{ id: 4, title: 'Mad Max: Fury Road', genres: ['Adventure', 'Science Fiction'] },
{ id: 5, title: 'Moana', genres: ['Fantasy', 'Action']},
{ id: 6, title: 'Philadelphia', genres: ['Drama'] },
]
// If the index 'movies' does not exist, Meilisearch creates it when you first add the documents.
let response = await index.addDocuments(documents)
console.log(response) // => { "uid": 0 }
})()
+
+Tasks such as document addition always return a unique identifier. You can use this identifier taskUid
to check the status (enqueued
, canceled
, processing
, succeeded
or failed
) of a task.
// Meilisearch is typo-tolerant:
const search = await index.search('philoudelphia')
console.log(search)
+
+Output:
+{
"hits": [
{
"id": "6",
"title": "Philadelphia",
"genres": ["Drama"]
}
],
"offset": 0,
"limit": 20,
"estimatedTotalHits": 1,
"processingTimeMs": 1,
"query": "philoudelphia"
}
+
+meilisearch-js
supports all search parameters described in our main documentation website.
await index.search(
'wonder',
{
attributesToHighlight: ['*']
}
)
+
+{
"hits": [
{
"id": 2,
"title": "Wonder Woman",
"genres": ["Action", "Adventure"],
"_formatted": {
"id": "2",
"title": "<em>Wonder</em> Woman",
"genres": ["Action", "Adventure"]
}
}
],
"offset": 0,
"limit": 20,
"estimatedTotalHits": 1,
"processingTimeMs": 0,
"query": "wonder"
}
+
+To enable filtering, you must first add your attributes to the filterableAttributes
index setting.
await index.updateFilterableAttributes([
'id',
'genres'
])
+
+You only need to perform this operation once per index.
+Note that Meilisearch rebuilds your index whenever you update filterableAttributes
. Depending on the size of your dataset, this might take considerable time. You can track the process using the tasks API).
After you configured filterableAttributes
, you can use the filter
search parameter to refine your search:
await index.search(
'wonder',
{
filter: ['id > 1 AND genres = Action']
}
)
+
+{
"hits": [
{
"id": 2,
"title": "Wonder Woman",
"genres": ["Action","Adventure"]
}
],
"offset": 0,
"limit": 20,
"estimatedTotalHits": 1,
"processingTimeMs": 0,
"query": "wonder"
}
+
+Placeholder search makes it possible to receive hits based on your parameters without having any query (q
). For example, in a movies database you can run an empty query to receive all results filtered by genre
.
await index.search(
'',
{
filter: ['genres = fantasy'],
facets: ['genres']
}
)
+
+{
"hits": [
{
"id": 2,
"title": "Wonder Woman",
"genres": ["Action","Adventure"]
},
{
"id": 5,
"title": "Moana",
"genres": ["Fantasy","Action"]
}
],
"offset": 0,
"limit": 20,
"estimatedTotalHits": 2,
"processingTimeMs": 0,
"query": "",
"facetDistribution": {
"genres": {
"Action": 2,
"Fantasy": 1,
"Adventure": 1
}
}
}
+
+Note that to enable faceted search on your dataset you need to add genres
to the filterableAttributes
index setting. For more information on filtering and faceting, consult our documentation settings.
You can abort a pending search request by providing an AbortSignal to the request.
+const controller = new AbortController()
index
.search('wonder', {}, {
signal: controller.signal,
})
.then((response) => {
/** ... */
})
.catch((e) => {
/** Catch AbortError here. */
})
controller.abort()
+
+You can provide a custom request configuration. for example, with custom headers.
+const client: MeiliSearch = new MeiliSearch({
host: 'http://localhost:3000/api/meilisearch/proxy',
requestConfig: {
headers: {
Authorization: AUTH_TOKEN
},
// OR
credentials: 'include'
}
})
+
+You can use your own HTTP client, for example, with axios
.
const client: MeiliSearch = new MeiliSearch({
host: 'http://localhost:3000/api/meilisearch/proxy',
httpClient: async (url, opts) => {
const response = await $axios.request({
url,
data: opts?.body,
headers: opts?.headers,
method: (opts?.method?.toLocaleUpperCase() as Method) ?? 'GET'
})
return response.data
}
})
+
+This package guarantees compatibility with version v1.x of Meilisearch, but some features may not be present. Please check the issues for more info.
+The following sections in our main documentation website may interest you:
+This repository also contains more examples.
+We welcome all contributions, big and small! If you want to know more about this SDK's development workflow or want to contribute to the repo, please visit our contributing guidelines for detailed instructions.
+client.index<T>('xxx').search(query: string, options: SearchParams = {}, config?: Partial<Request>): Promise<SearchResponse<T>>
+
+client.index<T>('xxx').searchGet(query: string, options: SearchParams = {}, config?: Partial<Request>): Promise<SearchResponse<T>>
+
+client.multiSearch(queries?: MultiSearchParams, config?: Partial<Request>): Promise<Promise<MultiSearchResponse<T>>>
+
+multiSearch
uses the POST
method when performing its request to Meilisearch.
client.index<T>('myIndex').searchForFacetValues(params: SearchForFacetValuesParams, config?: Partial<Request>): Promise<SearchForFacetValuesResponse>
+
+client.index('myIndex').addDocuments(documents: Document<T>[]): Promise<EnqueuedTask>
+
+client.index('myIndex').addDocumentsFromString(documents: string, contentType: ContentType, queryParams: RawDocumentAdditionOptions): Promise<EnqueuedTask>
+
+client.index('myIndex').addDocumentsInBatches(documents: Document<T>[], batchSize = 1000): Promise<EnqueuedTask[]>
+
+client.index('myIndex').updateDocuments(documents: Array<Document<Partial<T>>>): Promise<EnqueuedTask>
+
+client.index('myIndex').updateDocumentsFromString(documents: string, contentType: ContentType, queryParams: RawDocumentAdditionOptions): Promise<EnqueuedTask>
+
+client.index('myIndex').updateDocumentsInBatches(documents: Array<Document<Partial<T>>>, batchSize = 1000): Promise<EnqueuedTask[]>
+
+client.index.getDocuments(parameters: DocumentsQuery = {}): Promise<DocumentsResults<T>>>
+
+client.index('myIndex').getDocument(documentId: string): Promise<Document<T>>
+
+client.index('myIndex').deleteDocument(documentId: string | number): Promise<EnqueuedTask>
+
+client.index('myIndex').deleteDocuments(params: DocumentsDeletionQuery | DocumentsIds): Promise<EnqueuedTask>
+
+client.index('myIndex').deleteAllDocuments(): Promise<Types.EnqueuedTask>
+
+client.getTasks(parameters: TasksQuery): Promise<TasksResults>
+
+client.getTask(uid: number): Promise<Task>
+
+client.deleteTasks(parameters: DeleteTasksQuery = {}): Promise<EnqueuedTask>
+
+client.cancelTasks(parameters: CancelTasksQuery = {}): Promise<EnqueuedTask>
+
+client.index('myIndex').getTasks(parameters: TasksQuery): Promise<TasksResults>
+
+client.index('myIndex').getTask(uid: number): Promise<Task>
+
+client.waitForTask(uid: number, { timeOutMs?: number, intervalMs?: number }): Promise<Task>
+
+client.index('myIndex').waitForTask(uid: number, { timeOutMs?: number, intervalMs?: number }): Promise<Task>
+
+client.waitForTasks(uids: number[], { timeOutMs?: number, intervalMs?: number }): Promise<Task[]>
+
+client.index('myIndex').waitForTasks(uids: number[], { timeOutMs?: number, intervalMs?: number }): Promise<Task[]>
+
+client.getIndexes(parameters: IndexesQuery): Promise<IndexesResults<Index[]>>
+
+client.getRawIndexes(parameters: IndexesQuery): Promise<IndexesResults<IndexObject[]>>
+
+client.createIndex<T>(uid: string, options?: IndexOptions): Promise<EnqueuedTask>
+
+client.index<T>(uid: string): Index<T>
+
+client.getIndex<T>(uid: string): Promise<Index<T>>
+
+client.getRawIndex(uid: string): Promise<IndexObject>
+
+client.index('myIndex').getRawInfo(): Promise<IndexObject>
+
+client.updateIndex(uid: string, options: IndexOptions): Promise<EnqueuedTask>
+
+client.index('myIndex').update(data: IndexOptions): Promise<EnqueuedTask>
+
+client.deleteIndex(uid): Promise<void>
+
+client.index('myIndex').delete(): Promise<void>
+
+client.index('myIndex').getStats(): Promise<IndexStats>
+
+client.index('myIndex').fetchInfo(): Promise<Index>
+
+client.index('myIndex').fetchPrimaryKey(): Promise<string | undefined>
+
+client.swapIndexes(params: SwapIndexesParams): Promise<EnqueuedTask>
+
+client.index('myIndex').getSettings(): Promise<Settings>
+
+client.index('myIndex').updateSettings(settings: Settings): Promise<EnqueuedTask>
+
+client.index('myIndex').resetSettings(): Promise<EnqueuedTask>
+
+client.index('myIndex').getPagination(): Promise<PaginationSettings>
+
+client.index('myIndex').updatePagination(pagination: PaginationSettings): Promise<EnqueuedTask>
+
+client.index('myIndex').resetPagination(): Promise<EnqueuedTask>
+
+client.index('myIndex').getSynonyms(): Promise<Synonyms>
+
+client.index('myIndex').updateSynonyms(synonyms: Synonyms): Promise<EnqueuedTask>
+
+client.index('myIndex').resetSynonyms(): Promise<EnqueuedTask>
+
+client.index('myIndex').getStopWords(): Promise<string[]>
+
+client.index('myIndex').updateStopWords(stopWords: string[] | null ): Promise<EnqueuedTask>
+
+client.index('myIndex').resetStopWords(): Promise<EnqueuedTask>
+
+client.index('myIndex').getRankingRules(): Promise<string[]>
+
+client.index('myIndex').updateRankingRules(rankingRules: string[] | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetRankingRules(): Promise<EnqueuedTask>
+
+client.index('myIndex').getDistinctAttribute(): Promise<string | void>
+
+client.index('myIndex').updateDistinctAttribute(distinctAttribute: string | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetDistinctAttribute(): Promise<EnqueuedTask>
+
+client.index('myIndex').getSearchableAttributes(): Promise<string[]>
+
+client.index('myIndex').updateSearchableAttributes(searchableAttributes: string[] | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetSearchableAttributes(): Promise<EnqueuedTask>
+
+client.index('myIndex').getDisplayedAttributes(): Promise<string[]>
+
+client.index('myIndex').updateDisplayedAttributes(displayedAttributes: string[] | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetDisplayedAttributes(): Promise<EnqueuedTask>
+
+client.index('myIndex').getFilterableAttributes(): Promise<string[]>
+
+client.index('myIndex').updateFilterableAttributes(filterableAttributes: string[] | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetFilterableAttributes(): Promise<EnqueuedTask>
+
+client.index('myIndex').getSortableAttributes(): Promise<string[]>
+
+client.index('myIndex').updateSortableAttributes(sortableAttributes: string[] | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetSortableAttributes(): Promise<EnqueuedTask>
+
+client.index('myIndex').getFaceting(): Promise<Faceting>
+
+client.index('myIndex').updateFaceting(faceting: Faceting): Promise<EnqueuedTask>
+
+client.index('myIndex').resetFaceting(): Promise<EnqueuedTask>
+
+client.index('myIndex').getTypoTolerance(): Promise<TypoTolerance>
+
+client.index('myIndex').updateTypoTolerance(typoTolerance: TypoTolerance | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetTypoTolerance(): Promise<EnqueuedTask>
+
+client.index('myIndex').getSeparatorTokens(): Promise<SeparatorTokens>
+
+client.index('myIndex').updateSeparatorTokens(separatorTokens: SeparatorTokens | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetSeparatorTokens(): Promise<EnqueuedTask>
+
+client.index('myIndex').getNonSeparatorTokens(): Promise<NonSeparatorTokens>
+
+client.index('myIndex').updateNonSeparatorTokens(nonSeparatorTokens: NonSeparatorTokens | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetNonSeparatorTokens(): Promise<EnqueuedTask>
+
+client.index('myIndex').getDictionary(): Promise<Dictionary>
+
+client.index('myIndex').updateDictionary(dictionary: Dictionary | null): Promise<EnqueuedTask>
+
+client.index('myIndex').resetDictionary(): Promise<EnqueuedTask>
+
+client.index('myIndex').getProximityPrecision(): Promise<ProximityPrecision>
+
+client.index('myIndex').updateProximityPrecision(proximityPrecision: ProximityPrecision): Promise<EnqueuedTask>
+
+client.index('myIndex').resetProximityPrecision(): Promise<EnqueuedTask>
+
+⚠️ This feature is experimental. Activate the vectorStore
experimental feature to use it
client.index('myIndex').getEmbedders(): Promise<Embedders>
+
+client.index('myIndex').updateEmbedders(embedders: Embedders): Promise<EnqueuedTask>
+
+client.index('myIndex').resetEmbedders(): Promise<EnqueuedTask>
+
+client.index('myIndex').getSearchCutoffMs(): Promise<SearchCutoffMs>
+
+client.index('myIndex').updateSearchCutoffMs(searchCutoffMs: SearchCutoffMs): Promise<EnqueuedTask>
+
+client.index('myIndex').resetSearchCutoffMs(): Promise<EnqueuedTask>
+
+client.getKeys(parameters: KeysQuery): Promise<KeysResults>
+
+client.getKey(keyOrUid: string): Promise<Key>
+
+client.createKey(options: KeyCreation): Promise<Key>
+
+client.updateKey(keyOrUid: string, options: KeyUpdate): Promise<Key>
+
+client.deleteKey(keyOrUid: string): Promise<void>
+
+isHealthy
true
or false
depending on the health of the serverclient.isHealthy(): Promise<boolean>
+
+client.health(): Promise<Health>
+
+client.getStats(): Promise<Stats>
+
+client.getVersion(): Promise<Version>
+
+client.createDump(): Promise<EnqueuedTask>
+
+client.createSnapshot(): Promise<EnqueuedTask>
+
+Meilisearch provides and maintains many SDKs and integration tools like this one. We want to provide everyone with an amazing search experience for any kind of project. For a full overview of everything we create and maintain, take a look at the integration-guides repository.
+Optional
causeOptional
stackOptional
apiOptional
clientOptional
httpOptional
init: RequestInitOptional
requestOptional
timeout?: numberOptional
attributesOptional
cropOptional
cropOptional
primaryOptional
indexOptional
maxOptional
sortOptional
attributesOptional
highlightOptional
highlightOptional
_federation?: FederationDetailsOptional
_formatted?: Partial<T>Optional
_matchesOptional
_rankingOptional
_rankingOptional
distribution?: DistributionOptional
documentOptional
model?: stringOptional
revision?: stringOptional
embedder?: stringOptional
semanticOptional
primaryOptional
primaryOptional
description?: stringOptional
name?: stringOptional
uid?: stringOptional
description?: stringOptional
name?: stringOptional
limit?: numberOptional
offset?: numberOptional
federationOptional
apiOptional
dimensions?: numberOptional
distribution?: DistributionOptional
documentOptional
model?: stringOptional
url?: stringOptional
apiOptional
dimensions?: numberOptional
distribution?: DistributionOptional
documentOptional
model?: stringOptional
url?: stringOptional
limit?: numberOptional
offset?: numberOptional
maxOptional
q?: string | nullOptional
attribute?: { Optional
exactness?: { Optional
proximity?: { Optional
typo?: { Optional
words?: { Optional
csvOptional
apiOptional
dimensions?: numberOptional
distribution?: DistributionOptional
documentOptional
headers?: Record<string, string>Optional
attributesOptional
attributesOptional
distinct?: stringOptional
facetOptional
facetOptional
facets?: string[]Optional
filter?: FilterOptional
hitsOptional
hybrid?: HybridSearchOptional
locales?: Locale[]Optional
matchingOptional
page?: numberOptional
rankingOptional
retrieveOptional
showOptional
showOptional
showOptional
sort?: string[]Optional
vector?: number[] | nullOptional
attributesOptional
attributesOptional
attributesOptional
attributesOptional
distinct?: stringOptional
facets?: stringOptional
filter?: stringOptional
hybridOptional
hybridOptional
locales?: Locale[]Optional
rankingOptional
retrieveOptional
showOptional
sort?: stringOptional
vector?: string | nullOptional
facetOptional
facetOptional
attributesOptional
embedder?: stringOptional
filter?: FilterOptional
limit?: numberOptional
offset?: numberOptional
rankingOptional
showOptional
showOptional
dictionary?: DictionaryOptional
displayedOptional
distinctOptional
embedders?: EmbeddersOptional
faceting?: FacetingOptional
filterableOptional
localizedOptional
nonOptional
pagination?: PaginationSettingsOptional
proximityOptional
rankingOptional
searchOptional
searchableOptional
separatorOptional
sortableOptional
stopOptional
synonyms?: SynonymsOptional
typoOptional
canceledOptional
deletedOptional
deletedOptional
displayedOptional
distinctOptional
filterableOptional
indexedOptional
matchedOptional
originalOptional
primaryOptional
providedOptional
rankingOptional
receivedOptional
searchableOptional
sortableOptional
stopOptional
swaps?: SwapIndexesParamsOptional
synonyms?: SynonymsOptional
afterOptional
afterOptional
afterOptional
beforeOptional
beforeOptional
beforeOptional
canceledOptional
from?: numberOptional
indexOptional
limit?: numberOptional
statuses?: TaskStatus[]Optional
types?: TaskTypes[]Optional
uids?: number[]Optional
apiOptional
expiresOptional
disableOptional
disableOptional
enabled?: boolean | nullOptional
minOptional
oneOptional
twoOptional
context?: Record<string, any>Optional
filter?: string | string[]Optional
distribution?: DistributionOptional
intervalOptional
timeConst
Const
Const
Readonly
ALL: "all"Readonly
FREQUENCY: "frequency"Readonly
LAST: "last"Const
Readonly
TASK_Readonly
TASK_Readonly
TASK_Readonly
TASK_Readonly
TASK_Const
Readonly
DOCUMENTS_Readonly
DOCUMENT_Readonly
DUMP_Readonly
INDEXES_Readonly
INDEX_Readonly
INDEX_Readonly
INDEX_Readonly
SETTINGS_Readonly
SNAPSHOT_Readonly
TASK_Readonly
TASK_
Request configuration options
+