ISearchService
internal.SearchTypes.ISearchService
Implemented by
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
Parameters
indexName
stringRequiredthe index name.
documents
unknownRequiredarray of document objects that will replace existing documents
type
stringRequiredtype of documents to be replaced (e.g: products, regions, orders, etc)
Returns
unknown
unknown
unknownreturns response from search engine provider
search
search(indexName
, query
, options
): unknown
Used to search for a document in an index
Parameters
indexName
stringRequiredthe index name
query
null | stringRequiredthe search query
options
unknownRequiredany options passed to the request object other than the query and indexName - additionalOptions contain any provider specific options
Returns
unknown
unknown
unknownreturns response from search engine provider
updateSettings
updateSettings(indexName
, settings
): unknown
Used to update the settings of an index
Parameters
indexName
stringRequiredthe index name
settings
unknownRequiredsettings object
Returns
unknown
unknown
unknownreturns response from search engine provider
Was this section helpful?