SearchService
internal.internal.SearchService
Properties
Accessors
options
get
options(): Record<string
, unknown
>
Returns
Record<string
, unknown
>
Record
Record<string, unknown>Required
Record
Record<string, unknown>RequiredInherited from
AbstractSearchService.options
Methods
addDocuments
addDocuments(indexName
, documents
, type
): Promise
<void
>
Used to index documents by the search engine provider
Parameters
indexName
stringRequireddocuments
unknownRequiredtype
stringRequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredOverrides
AbstractSearchService.addDocuments
createIndex
createIndex(indexName
, options
): Promise
<void
>
Used to create an index
Parameters
indexName
stringRequiredoptions
unknownRequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredOverrides
AbstractSearchService.createIndex
deleteAllDocuments
deleteAllDocuments(indexName
): Promise
<void
>
Used to delete all documents
Parameters
indexName
stringRequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredOverrides
AbstractSearchService.deleteAllDocuments
deleteDocument
deleteDocument(indexName
, document_id
): Promise
<void
>
Used to delete document
Parameters
indexName
stringRequireddocument_id
string | numberRequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredOverrides
AbstractSearchService.deleteDocument
getIndex
getIndex(indexName
): Promise
<void
>
Used to get an index
Parameters
indexName
stringRequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredOverrides
AbstractSearchService.getIndex
replaceDocuments
replaceDocuments(indexName
, documents
, type
): Promise
<void
>
Used to replace documents
Parameters
indexName
stringRequireddocuments
unknownRequiredtype
stringRequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredOverrides
AbstractSearchService.replaceDocuments
search
search(indexName
, query
, options
): Promise
<{ hits
: unknown
[] }>
Used to search for a document in an index
Parameters
indexName
stringRequiredquery
unknownRequiredoptions
unknownRequiredReturns
Promise
<{ hits
: unknown
[] }>
Promise
Promise<{ hits: unknown[] }>Requiredreturns response from search engine provider
Promise
Promise<{ hits: unknown[] }>RequiredOverrides
updateSettings
updateSettings(indexName
, settings
): Promise
<void
>
Used to update the settings of an index
Parameters
indexName
stringRequiredsettings
unknownRequiredReturns
Promise
<void
>
Promise
Promise<void>Required