ISearchService
Properties
options
Record<string, unknown>RequiredMethods
addDocuments
**addDocuments**(indexName, documents, type): unknown
Used to index documents by the search engine provider
Parameters
indexName
stringRequiredthe index name
documents
unknownRequireddocuments array to be indexed
type
stringRequiredof documents to be added (e.g: products, regions, orders, etc)
Returns
unknown
unknown
unknownreturns response from search engine provider
createIndex
**createIndex**(indexName, options): unknown
Used to create an index
Parameters
indexName
stringRequiredthe index name
options
unknownRequiredthe options
Returns
unknown
unknown
unknownreturns response from search engine provider
deleteAllDocuments
**deleteAllDocuments**(indexName): unknown
Used to delete all documents
Parameters
indexName
stringRequiredthe index name
Returns
unknown
unknown
unknownreturns response from search engine provider
deleteDocument
**deleteDocument**(indexName, document_id): unknown
Used to delete document
Parameters
indexName
stringRequiredthe index name
document_id
string | numberRequiredthe id of the document
Returns
unknown
unknown
unknownreturns response from search engine provider
getIndex
**getIndex**(indexName): unknown
Used to get an index
Parameters
indexName
stringRequiredthe index name.
Returns
unknown
unknown
unknownreturns response from search engine provider
replaceDocuments
**replaceDocuments**(indexName, documents, type): unknown
Used to replace documents