Skip to main content
Skip to main content

ISearchService

Properties

optionsRecord<string, unknown>Required

Methods

createIndex

Used to create an index

Parameters

indexNamestringRequired
the index name
optionsunknownRequired
the options

Returns

unknownunknownRequired
returns response from search engine provider

getIndex

Used to get an index

Parameters

indexNamestringRequired
the index name.

Returns

unknownunknownRequired
returns response from search engine provider

addDocuments

Used to index documents by the search engine provider

Parameters

indexNamestringRequired
the index name
documentsunknownRequired
documents array to be indexed
typestringRequired
of documents to be added (e.g: products, regions, orders, etc)

Returns

unknownunknownRequired
returns response from search engine provider

replaceDocuments

Used to replace documents

Parameters

indexNamestringRequired
the index name.
documentsunknownRequired
array of document objects that will replace existing documents
typestringRequired
type of documents to be replaced (e.g: products, regions, orders, etc)

Returns

unknownunknownRequired
returns response from search engine provider

deleteDocument

Used to delete document

Parameters

indexNamestringRequired
the index name
document_idstring | numberRequired
the id of the document

Returns

unknownunknownRequired
returns response from search engine provider

deleteAllDocuments

Used to delete all documents

Parameters

indexNamestringRequired
the index name

Returns

unknownunknownRequired
returns response from search engine provider

Used to search for a document in an index

Parameters

indexNamestringRequired
the index name
querynull | stringRequired
the search query
optionsunknownRequired
any options passed to the request object other than the query and indexName
  • additionalOptions contain any provider specific options

Returns

unknownunknownRequired
returns response from search engine provider

updateSettings

Used to update the settings of an index

Parameters

indexNamestringRequired
the index name
settingsunknownRequired
settings object

Returns

unknownunknownRequired
returns response from search engine provider
Was this section helpful?