Meilisearch JS / index / Index
Class: Index<T>
Defined in: src/indexes.ts:70
Type Parameters
T
T extends RecordAny = RecordAny
Constructors
Constructor
new Index<
T>(config,uid,primaryKey?):Index<T>
Defined in: src/indexes.ts:84
Parameters
config
Request configuration options
uid
string
UID of the index
primaryKey?
string
Primary Key of the index
Returns
Index<T>
Properties
createdAt
createdAt:
Date|undefined
Defined in: src/indexes.ts:73
httpRequest
httpRequest:
HttpRequests
Defined in: src/indexes.ts:75
primaryKey
primaryKey:
string|undefined
Defined in: src/indexes.ts:72
tasks
tasks:
TaskClient
Defined in: src/indexes.ts:76
uid
uid:
string
Defined in: src/indexes.ts:71
updatedAt
updatedAt:
Date|undefined
Defined in: src/indexes.ts:74
Methods
addDocuments()
addDocuments(
documents,options?):EnqueuedTaskPromise
Defined in: src/indexes.ts:383
Add or replace multiples documents to an index
Parameters
documents
T[]
Array of Document objects to add/replace
options?
Options on document addition
Returns
Promise containing an EnqueuedTask
addDocumentsFromString()
addDocumentsFromString(
documents,contentType,queryParams?):EnqueuedTaskPromise
Defined in: src/indexes.ts:401
Add or replace multiples documents in a string format to an index. It only supports csv, ndjson and json formats.
Parameters
documents
string
Documents provided in a string to add/replace
contentType
Content type of your document: 'text/csv'|'application/x-ndjson'|'application/json'
queryParams?
Returns
Promise containing an EnqueuedTask
addDocumentsInBatches()
addDocumentsInBatches(
documents,batchSize?,options?):EnqueuedTaskPromise[]
Defined in: src/indexes.ts:422
Add or replace multiples documents to an index in batches
Parameters
documents
T[]
Array of Document objects to add/replace
batchSize?
number = 1000
Size of the batch
options?
Options on document addition
Returns
Promise containing array of enqueued task objects for each batch
compact()
compact():
EnqueuedTaskPromise
Defined in: src/indexes.ts:566
Compact the index database to reclaim space and improve read performance.
Returns
Promise containing an EnqueuedTask
delete()
delete():
EnqueuedTaskPromise
Defined in: src/indexes.ts:284
Delete an index.
Returns
Promise which resolves when index is deleted successfully
deleteAllDocuments()
deleteAllDocuments(
options?):EnqueuedTaskPromise
Defined in: src/indexes.ts:554
Delete all documents of an index
Parameters
options?
Returns
Promise containing an EnqueuedTask
deleteDocument()
deleteDocument(
documentId,options?):EnqueuedTaskPromise
Defined in: src/indexes.ts:510
Delete one document
Parameters
documentId
string | number
Id of Document to delete
options?
Task enqueue options (e.g. customMetadata)
Returns
Promise containing an EnqueuedTask
deleteDocuments()
deleteDocuments(
params,options?):EnqueuedTaskPromise
Defined in: src/indexes.ts:531
Delete multiples documents of an index.
Parameters
params
DocumentsDeletionQuery | DocumentsIds
Params value can be:
- DocumentsDeletionQuery: An object containing the parameters to customize your document deletion. Only available in Meilisearch v1.2 and newer
- DocumentsIds: An array of document ids to delete
options?
Returns
Promise containing an EnqueuedTask
fetchInfo()
fetchInfo():
Promise<Index<T>>
Defined in: src/indexes.ts:228
Fetch and update Index information.
Returns
Promise<Index<T>>
Promise to the current Index object with updated information
fetchPrimaryKey()
fetchPrimaryKey():
Promise<string|undefined>
Defined in: src/indexes.ts:238
Get Primary Key.
Returns
Promise<string | undefined>
Promise containing the Primary Key of the index
getChat()
getChat():
Promise<ChatSettings>
Defined in: src/indexes.ts:1527
Get the index's chat settings.
Returns
Promise<ChatSettings>
Promise containing a ChatSettings object
getDictionary()
getDictionary():
Promise<string[]>
Defined in: src/indexes.ts:1168
Get the dictionary settings of a Meilisearch index.
Returns
Promise<string[]>
Promise containing the dictionary settings
getDisplayedAttributes()
getDisplayedAttributes():
Promise<string[]>
Defined in: src/indexes.ts:967
Get the displayed-attributes
Returns
Promise<string[]>
Promise containing array of displayed-attributes
getDistinctAttribute()
getDistinctAttribute():
Promise<DistinctAttribute>
Defined in: src/indexes.ts:800
Get the distinct-attribute
Returns
Promise<DistinctAttribute>
Promise containing the distinct-attribute of the index
getDocument()
getDocument<
D>(documentId,parameters?):Promise<D>
Defined in: src/indexes.ts:362
Get one document
Type Parameters
D
D extends RecordAny = T
Parameters
documentId
string | number
Document ID
parameters?
Parameters applied on a document
Returns
Promise<D>
Promise containing Document response
getDocuments()
getDocuments<
D>(params?):Promise<ResourceResults<D[]>>
Defined in: src/indexes.ts:327
Get documents of an index.
Type Parameters
D
D extends RecordAny = T
Parameters
params?
Parameters to browse the documents. Parameters can contain the filter field only available in Meilisearch v1.2 and newer, and the sort field available in Meilisearch v1.16 and newer
Returns
Promise<ResourceResults<D[]>>
Promise containing the returned documents
getEmbedders()
getEmbedders():
Promise<Embedders>
Defined in: src/indexes.ts:1249
Get the embedders settings of a Meilisearch index.
Returns
Promise<Embedders>
Promise containing the embedders settings
getFaceting()
getFaceting():
Promise<Faceting>
Defined in: src/indexes.ts:1049
Get the faceting settings.
Returns
Promise<Faceting>
Promise containing object of faceting index settings
getFacetSearch()
getFacetSearch():
Promise<boolean>
Defined in: src/indexes.ts:1407
Get the facet search settings.
Returns
Promise<boolean>
Promise containing object of facet search settings
getFields()
getFields(
params?,extraRequestInit?):Promise<FieldsResults>
Defined in: src/indexes.ts:1559
Retrieve fields from an index with optional filtering and pagination. This endpoint allows you to query fields based on their properties (searchable, filterable, displayed, sortable, distinct, rankingRule, and localized).
Parameters
params?
Query parameters including pagination and filter options
extraRequestInit?
Additional request configuration options
Returns
Promise<FieldsResults>
Promise containing the fields results with pagination info
getFilterableAttributes()
getFilterableAttributes():
Promise<FilterableAttributes>
Defined in: src/indexes.ts:841
Get the filterable-attributes
Returns
Promise<FilterableAttributes>
Promise containing an array of filterable-attributes
getForeignKeys()
getForeignKeys():
Promise<ForeignKey[]>
Defined in: src/indexes.ts:1368
Get the foreign keys settings.
Returns
Promise<ForeignKey[]>
Promise containing an array of foreign key settings
getLocalizedAttributes()
getLocalizedAttributes():
Promise<LocalizedAttributes>
Defined in: src/indexes.ts:1327
Get the localized attributes settings.
Returns
Promise<LocalizedAttributes>
Promise containing object of localized attributes settings
getNonSeparatorTokens()
getNonSeparatorTokens():
Promise<string[]>
Defined in: src/indexes.ts:1127
Get the list of all non-separator tokens.
Returns
Promise<string[]>
Promise containing array of non-separator tokens
getPagination()
getPagination():
Promise<PaginationSettings>
Defined in: src/indexes.ts:643
Get the pagination settings.
Returns
Promise<PaginationSettings>
Promise containing object of pagination settings
getPrefixSearch()
getPrefixSearch():
Promise<PrefixSearch>
Defined in: src/indexes.ts:1446
Get the prefix search settings.
Returns
Promise<PrefixSearch>
Promise containing object of prefix search settings
getProximityPrecision()
getProximityPrecision():
Promise<ProximityPrecision>
Defined in: src/indexes.ts:1207
Get the proximity precision settings of a Meilisearch index.
Returns
Promise<ProximityPrecision>
Promise containing the proximity precision settings
getRankingRules()
getRankingRules():
Promise<string[]>
Defined in: src/indexes.ts:760
Get the list of all ranking-rules
Returns
Promise<string[]>
Promise containing array of ranking-rules
getRawInfo()
getRawInfo():
Promise<IndexObject>
Defined in: src/indexes.ts:213
Get index information.
Returns
Promise<IndexObject>
Promise containing index information
getSearchableAttributes()
getSearchableAttributes():
Promise<string[]>
Defined in: src/indexes.ts:925
Get the searchable-attributes
Returns
Promise<string[]>
Promise containing array of searchable-attributes
getSearchCutoffMs()
getSearchCutoffMs():
Promise<SearchCutoffMs>
Defined in: src/indexes.ts:1288
Get the SearchCutoffMs settings.
Returns
Promise<SearchCutoffMs>
Promise containing object of SearchCutoffMs settings
getSeparatorTokens()
getSeparatorTokens():
Promise<string[]>
Defined in: src/indexes.ts:1088
Get the list of all separator tokens.
Returns
Promise<string[]>
Promise containing array of separator tokens
getSettings()
getSettings():
Promise<Settings>
Defined in: src/indexes.ts:604
Retrieve all settings
Returns
Promise<Settings>
Promise containing Settings object
getSortableAttributes()
getSortableAttributes():
Promise<string[]>
Defined in: src/indexes.ts:883
Get the sortable-attributes
Returns
Promise<string[]>
Promise containing array of sortable-attributes
getStats()
getStats<
Q>(params?):Promise<IndexStats<Q>>
Defined in: src/indexes.ts:306
Get stats of an index
Size fields are numbers of bytes by default. sizeFormat: "human" returns them as strings with units, such as "19.64 MiB". showInternalDatabaseSizes adds each internal database's size.
Type Parameters
Q
Q extends StatsQuery | undefined = undefined
Stats query whose sizeFormat selects the size field type
Parameters
params?
Q
Internal database sizes and size formatting
Returns
Promise<IndexStats<Q>>
Promise containing stats of the index
See
https://www.meilisearch.com/docs/reference/api/indexes/get-stats-of-index
getStopWords()
getStopWords():
Promise<string[]>
Defined in: src/indexes.ts:721
Get the list of all stop-words
Returns
Promise<string[]>
Promise containing array of stop-words
getSynonyms()
getSynonyms():
Promise<Record<string,string[]>>
Defined in: src/indexes.ts:682
Get the list of all synonyms
Returns
Promise<Record<string, string[]>>
Promise containing record of synonym mappings
getTypoTolerance()
getTypoTolerance():
Promise<TypoTolerance>
Defined in: src/indexes.ts:1009
Get the typo tolerance settings.
Returns
Promise<TypoTolerance>
Promise containing the typo tolerance settings.
getWordPosition()
getWordPosition():
Promise<WordPositionSettings>
Defined in: src/indexes.ts:1486
Get the word position settings
Returns
Promise<WordPositionSettings>
Promise containing object of word position settings
See
https://www.meilisearch.com/docs/reference/api/settings/get-wordposition
resetDictionary()
resetDictionary():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1192
Reset the dictionary settings to its default value
Returns
Promise containing an EnqueuedTask
resetDisplayedAttributes()
resetDisplayedAttributes():
EnqueuedTaskPromise
Defined in: src/indexes.ts:994
Reset the displayed-attributes.
Returns
Promise containing an EnqueuedTask
resetDistinctAttribute()
resetDistinctAttribute():
EnqueuedTaskPromise
Defined in: src/indexes.ts:826
Reset the distinct-attribute.
Returns
Promise containing an EnqueuedTask
resetEmbedders()
resetEmbedders():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1273
Reset the embedders settings to its default value
Returns
Promise containing an EnqueuedTask
resetFaceting()
resetFaceting():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1073
Reset the faceting settings.
Returns
Promise containing an EnqueuedTask
resetFacetSearch()
resetFacetSearch():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1431
Reset the facet search settings.
Returns
Promise containing an EnqueuedTask
resetFilterableAttributes()
resetFilterableAttributes():
EnqueuedTaskPromise
Defined in: src/indexes.ts:868
Reset the filterable-attributes.
Returns
Promise containing an EnqueuedTask
resetForeignKeys()
resetForeignKeys():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1392
Reset the foreign keys settings.
Returns
Promise containing an EnqueuedTask
resetLocalizedAttributes()
resetLocalizedAttributes():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1353
Reset the localized attributes settings.
Returns
Promise containing an EnqueuedTask
resetNonSeparatorTokens()
resetNonSeparatorTokens():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1153
Reset the non-separator tokens list to its default value
Returns
Promise containing an EnqueuedTask
resetPagination()
resetPagination():
EnqueuedTaskPromise
Defined in: src/indexes.ts:667
Reset the pagination settings.
Returns
Promise containing an EnqueuedTask
resetPrefixSearch()
resetPrefixSearch():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1470
Reset the prefix search settings.
Returns
Promise containing an EnqueuedTask
resetProximityPrecision()
resetProximityPrecision():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1234
Reset the proximity precision settings to its default value
Returns
Promise containing an EnqueuedTask
resetRankingRules()
resetRankingRules():
EnqueuedTaskPromise
Defined in: src/indexes.ts:785
Reset the ranking rules list to its default value
Returns
Promise containing an EnqueuedTask
resetSearchableAttributes()
resetSearchableAttributes():
EnqueuedTaskPromise
Defined in: src/indexes.ts:952
Reset the searchable-attributes.
Returns
Promise containing an EnqueuedTask
resetSearchCutoffMs()
resetSearchCutoffMs():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1312
Reset the SearchCutoffMs settings.
Returns
Promise containing an EnqueuedTask
resetSeparatorTokens()
resetSeparatorTokens():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1112
Reset the separator tokens list to its default value
Returns
Promise containing an EnqueuedTask
resetSettings()
resetSettings():
EnqueuedTaskPromise
Defined in: src/indexes.ts:628
Reset settings.
Returns
Promise containing an EnqueuedTask
resetSortableAttributes()
resetSortableAttributes():
EnqueuedTaskPromise
Defined in: src/indexes.ts:910
Reset the sortable-attributes.
Returns
Promise containing an EnqueuedTask
resetStopWords()
resetStopWords():
EnqueuedTaskPromise
Defined in: src/indexes.ts:745
Reset the stop-words list to be empty again
Returns
Promise containing an EnqueuedTask
resetSynonyms()
resetSynonyms():
EnqueuedTaskPromise
Defined in: src/indexes.ts:706
Reset the synonym list to be empty again
Returns
Promise containing an EnqueuedTask
resetTypoTolerance()
resetTypoTolerance():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1034
Reset the typo tolerance settings.
Returns
Promise containing object of the enqueued update
resetWordPosition()
resetWordPosition():
EnqueuedTaskPromise
Defined in: src/indexes.ts:1512
Reset the word position settings
Returns
Promise containing an EnqueuedTask
See
https://www.meilisearch.com/docs/reference/api/settings/reset-wordposition
search()
search<
D,S>(query?,options?,extraRequestInit?):Promise<SearchResponse<D,S>>
Defined in: src/indexes.ts:112
Search for documents into an index
Type Parameters
D
D extends RecordAny = T
S
S extends SearchParams = SearchParams
Parameters
query?
string | null
Query string
options?
S
Search options
extraRequestInit?
Returns
Promise<SearchResponse<D, S>>
Promise containing the search response
searchForFacetValues()
searchForFacetValues(
params,extraRequestInit?):Promise<SearchForFacetValuesResponse>
Defined in: src/indexes.ts:177
Search for facet values
Parameters
params
Parameters used to search on the facets
extraRequestInit?
Returns
Promise<SearchForFacetValuesResponse>
Promise containing the search response
searchGet()
searchGet<
D,S>(query?,options?,extraRequestInit?):Promise<SearchResponse<D,S>>
Defined in: src/indexes.ts:132
Search for documents into an index using the GET method
Type Parameters
D
D extends RecordAny = T
S
S extends SearchParams = SearchParams
Parameters
query?
string | null
Query string
options?
S
Search options
extraRequestInit?
Returns
Promise<SearchResponse<D, S>>
Promise containing the search response
searchSimilarDocuments()
searchSimilarDocuments<
D,S>(params):Promise<SearchResponse<D,S>>
Defined in: src/indexes.ts:194
Search for similar documents
Type Parameters
D
D extends RecordAny = T
S
S extends SearchParams = SearchParams
Parameters
params
Parameters used to search for similar documents
Returns
Promise<SearchResponse<D, S>>
Promise containing the search response
update()
update(
data?):EnqueuedTaskPromise
Defined in: src/indexes.ts:272
Update an index.
Parameters
data?
Data to update
Returns
Promise to the current Index object with updated information
updateChat()
updateChat(
chatSettings):EnqueuedTaskPromise
Defined in: src/indexes.ts:1539
Update the index's chat settings.
Parameters
chatSettings
ChatSettingsPayload object
Returns
Promise containing an EnqueuedTask
updateDictionary()
updateDictionary(
dictionary):EnqueuedTaskPromise
Defined in: src/indexes.ts:1180
Update the dictionary settings. Overwrite the old settings.
Parameters
dictionary
Array that contains the new dictionary settings.
Returns
Promise containing an EnqueuedTask or null
updateDisplayedAttributes()
updateDisplayedAttributes(
displayedAttributes):EnqueuedTaskPromise
Defined in: src/indexes.ts:980
Update the displayed-attributes.
Parameters
displayedAttributes
Array of strings that contains attributes of an index to display
Returns
Promise containing an EnqueuedTask
updateDistinctAttribute()
updateDistinctAttribute(
distinctAttribute):EnqueuedTaskPromise
Defined in: src/indexes.ts:812
Update the distinct-attribute.
Parameters
distinctAttribute
Field name of the distinct-attribute
Returns
Promise containing an EnqueuedTask
updateDocuments()
updateDocuments(
documents,options?):EnqueuedTaskPromise
Defined in: src/indexes.ts:445
Add or update multiples documents to an index
Parameters
documents
Partial<T>[]
Array of Document objects to add/update
options?
Options on document update
Returns
Promise containing an EnqueuedTask
updateDocumentsByFunction()
updateDocumentsByFunction(
options,taskOptions?):EnqueuedTaskPromise
Defined in: src/indexes.ts:584
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
Parameters
options
UpdateDocumentsByFunctionOptions
Object containing the function string and related options
taskOptions?
Returns
Promise containing an EnqueuedTask
updateDocumentsFromString()
updateDocumentsFromString(
documents,contentType,queryParams?):EnqueuedTaskPromise
Defined in: src/indexes.ts:490
Add or update multiples documents in a string format to an index. It only supports csv, ndjson and json formats.
Parameters
documents
string
Documents provided in a string to add/update
contentType
Content type of your document: 'text/csv'|'application/x-ndjson'|'application/json'
queryParams?
Options on raw document addition
Returns
Promise containing an EnqueuedTask
updateDocumentsInBatches()
updateDocumentsInBatches(
documents,batchSize?,options?):EnqueuedTaskPromise[]
Defined in: src/indexes.ts:464
Add or update multiples documents to an index in batches
Parameters
documents
Partial<T>[]
Array of Document objects to add/update
batchSize?
number = 1000
Size of the batch
options?
Options on document update
Returns
Promise containing array of enqueued task objects for each batch
updateEmbedders()
updateEmbedders(
embedders):EnqueuedTaskPromise
Defined in: src/indexes.ts:1261
Update the embedders settings. Overwrite the old settings.
Parameters
embedders
Object that contains the new embedders settings.
Returns
Promise containing an EnqueuedTask or null
updateFaceting()
updateFaceting(
faceting):EnqueuedTaskPromise
Defined in: src/indexes.ts:1061
Update the faceting settings.
Parameters
faceting
Faceting index settings object
Returns
Promise containing an EnqueuedTask
updateFacetSearch()
updateFacetSearch(
facetSearch):EnqueuedTaskPromise
Defined in: src/indexes.ts:1419
Update the facet search settings.
Parameters
facetSearch
boolean
Boolean value
Returns
Promise containing an EnqueuedTask
updateFilterableAttributes()
updateFilterableAttributes(
filterableAttributes):EnqueuedTaskPromise
Defined in: src/indexes.ts:854
Update the filterable-attributes.
Parameters
filterableAttributes
Array of strings containing the attributes that can be used as filters at query time
Returns
Promise containing an EnqueuedTask
updateForeignKeys()
updateForeignKeys(
foreignKeys):EnqueuedTaskPromise
Defined in: src/indexes.ts:1380
Update the foreign keys settings.
Parameters
foreignKeys
Foreign keys array
Returns
Promise containing an EnqueuedTask
updateLocalizedAttributes()
updateLocalizedAttributes(
localizedAttributes):EnqueuedTaskPromise
Defined in: src/indexes.ts:1339
Update the localized attributes settings.
Parameters
localizedAttributes
Localized attributes object
Returns
Promise containing an EnqueuedTask
updateNonSeparatorTokens()
updateNonSeparatorTokens(
nonSeparatorTokens):EnqueuedTaskPromise
Defined in: src/indexes.ts:1139
Update the list of non-separator tokens. Overwrite the old list.
Parameters
nonSeparatorTokens
Array that contains non-separator tokens.
Returns
Promise containing an EnqueuedTask or null
updatePagination()
updatePagination(
pagination):EnqueuedTaskPromise
Defined in: src/indexes.ts:655
Update the pagination settings.
Parameters
pagination
Pagination object
Returns
Promise containing an EnqueuedTask
updatePrefixSearch()
updatePrefixSearch(
prefixSearch):EnqueuedTaskPromise
Defined in: src/indexes.ts:1458
Update the prefix search settings.
Parameters
prefixSearch
PrefixSearch value
Returns
Promise containing an EnqueuedTask
updateProximityPrecision()
updateProximityPrecision(
proximityPrecision):EnqueuedTaskPromise
Defined in: src/indexes.ts:1220
Update the proximity precision settings. Overwrite the old settings.
Parameters
proximityPrecision
String that contains the new proximity precision settings.
Returns
Promise containing an EnqueuedTask or null
updateRankingRules()
updateRankingRules(
rankingRules):EnqueuedTaskPromise
Defined in: src/indexes.ts:773
Update the list of ranking-rules. Overwrite the old list.
Parameters
rankingRules
Array that contain ranking rules sorted by order of importance.
Returns
Promise containing an EnqueuedTask
updateSearchableAttributes()
updateSearchableAttributes(
searchableAttributes):EnqueuedTaskPromise
Defined in: src/indexes.ts:938
Update the searchable-attributes.
Parameters
searchableAttributes
Array of strings that contains searchable attributes sorted by order of importance(most to least important)
Returns
Promise containing an EnqueuedTask
updateSearchCutoffMs()
updateSearchCutoffMs(
searchCutoffMs):EnqueuedTaskPromise
Defined in: src/indexes.ts:1300
Update the SearchCutoffMs settings.
Parameters
searchCutoffMs
Object containing SearchCutoffMsSettings
Returns
Promise containing an EnqueuedTask
updateSeparatorTokens()
updateSeparatorTokens(
separatorTokens):EnqueuedTaskPromise
Defined in: src/indexes.ts:1100
Update the list of separator tokens. Overwrite the old list.
Parameters
separatorTokens
Array that contains separator tokens.
Returns
Promise containing an EnqueuedTask or null
updateSettings()
updateSettings(
settings):EnqueuedTaskPromise
Defined in: src/indexes.ts:616
Update all settings Any parameters not provided will be left unchanged.
Parameters
settings
Object containing parameters with their updated values
Returns
Promise containing an EnqueuedTask
updateSortableAttributes()
updateSortableAttributes(
sortableAttributes):EnqueuedTaskPromise
Defined in: src/indexes.ts:896
Update the sortable-attributes.
Parameters
sortableAttributes
Array of strings containing the attributes that can be used to sort search results at query time
Returns
Promise containing an EnqueuedTask
updateStopWords()
updateStopWords(
stopWords):EnqueuedTaskPromise
Defined in: src/indexes.ts:733
Update the list of stop-words. Overwrite the old list.
Parameters
stopWords
Array of strings that contains the stop-words.
Returns
Promise containing an EnqueuedTask
updateSynonyms()
updateSynonyms(
synonyms):EnqueuedTaskPromise
Defined in: src/indexes.ts:694
Update the list of synonyms. Overwrite the old list.
Parameters
synonyms
Mapping of synonyms with their associated words
Returns
Promise containing an EnqueuedTask
updateTypoTolerance()
updateTypoTolerance(
typoTolerance):EnqueuedTaskPromise
Defined in: src/indexes.ts:1022
Update the typo tolerance settings.
Parameters
typoTolerance
Object containing the custom typo tolerance settings.
Returns
Promise containing object of the enqueued update
updateWordPosition()
updateWordPosition(
wordPosition):EnqueuedTaskPromise
Defined in: src/indexes.ts:1499
Update the word position settings
Parameters
wordPosition
Object containing the word position settings
Returns
Promise containing an EnqueuedTask
See
https://www.meilisearch.com/docs/reference/api/settings/update-wordposition
create()
staticcreate(uid,options?,config):EnqueuedTaskPromise
Defined in: src/indexes.ts:251
Create an index.
Parameters
uid
string
Unique identifier of the Index
options?
IndexOptions = {}
Index options
config
Request configuration options
Returns
Newly created Index object