Skip to main content

Class: SearchService

Hierarchy

  • AbstractSearchService

    SearchService

Constructors

constructor

new SearchService(__namedParameters, options)

Parameters

NameType
__namedParametersInjectedDependencies
optionsany

Overrides

AbstractSearchService.constructor

Defined in

medusa/src/services/search.ts:16

Properties

isDefault

isDefault: boolean = true

Overrides

AbstractSearchService.isDefault

Defined in

medusa/src/services/search.ts:11


logger_

Protected Readonly logger_: Logger

Defined in

medusa/src/services/search.ts:13


options_

Protected Readonly options_: Record<string, unknown>

Overrides

AbstractSearchService.options_

Defined in

medusa/src/services/search.ts:14

Accessors

options

get options(): Record<string, unknown>

Returns

Record<string, unknown>

Inherited from

AbstractSearchService.options

Defined in

utils/dist/search/abstract-service.d.ts:5

Methods

addDocuments

addDocuments(indexName, documents, type): Promise<void>

Parameters

NameType
indexNamestring
documentsunknown
typestring

Returns

Promise<void>

Overrides

AbstractSearchService.addDocuments

Defined in

medusa/src/services/search.ts:40


createIndex

createIndex(indexName, options): Promise<void>

Parameters

NameType
indexNamestring
optionsunknown

Returns

Promise<void>

Overrides

AbstractSearchService.createIndex

Defined in

medusa/src/services/search.ts:28


deleteAllDocuments

deleteAllDocuments(indexName): Promise<void>

Parameters

NameType
indexNamestring

Returns

Promise<void>

Overrides

AbstractSearchService.deleteAllDocuments

Defined in

medusa/src/services/search.ts:69


deleteDocument

deleteDocument(indexName, document_id): Promise<void>

Parameters

NameType
indexNamestring
document_idstring | number

Returns

Promise<void>

Overrides

AbstractSearchService.deleteDocument

Defined in

medusa/src/services/search.ts:60


getIndex

getIndex(indexName): Promise<void>

Parameters

NameType
indexNamestring

Returns

Promise<void>

Overrides

AbstractSearchService.getIndex

Defined in

medusa/src/services/search.ts:34


replaceDocuments

replaceDocuments(indexName, documents, type): Promise<void>

Parameters

NameType
indexNamestring
documentsunknown
typestring

Returns

Promise<void>

Overrides

AbstractSearchService.replaceDocuments

Defined in

medusa/src/services/search.ts:50


search(indexName, query, options): Promise<{ hits: unknown[] }>

Parameters

NameType
indexNamestring
queryunknown
optionsunknown

Returns

Promise<{ hits: unknown[] }>

Overrides

AbstractSearchService.search

Defined in

medusa/src/services/search.ts:75


updateSettings

updateSettings(indexName, settings): Promise<void>

Parameters

NameType
indexNamestring
settingsunknown

Returns

Promise<void>

Overrides

AbstractSearchService.updateSettings

Defined in

medusa/src/services/search.ts:86

Was this page helpful?