Skip to main content

Class: SearchService

Default class that implements SearchService but provides stuv implementation for all methods

Hierarchy

  • "medusa-interfaces"

    SearchService

Constructors

constructor

new SearchService(container)

Parameters

NameType
containerany

Overrides

SearchService.constructor

Defined in

services/search.js:8

Properties

isDefault

isDefault: boolean

Defined in

services/search.js:11


logger_

logger_: any

Defined in

services/search.js:13

Methods

addDocuments

addDocuments(indexName, documents, type): void

Parameters

NameType
indexNameany
documentsany
typeany

Returns

void

Defined in

services/search.js:28


createIndex

createIndex(indexName, options): void

Parameters

NameType
indexNameany
optionsany

Returns

void

Defined in

services/search.js:16


deleteAllDocuments

deleteAllDocuments(indexName): void

Parameters

NameType
indexNameany

Returns

void

Defined in

services/search.js:46


deleteDocument

deleteDocument(indexName, document_id): void

Parameters

NameType
indexNameany
document_idany

Returns

void

Defined in

services/search.js:40


getIndex

getIndex(indexName): void

Parameters

NameType
indexNameany

Returns

void

Defined in

services/search.js:22


replaceDocuments

replaceDocuments(indexName, documents, type): void

Parameters

NameType
indexNameany
documentsany
typeany

Returns

void

Defined in

services/search.js:34


search(indexName, query, options): Object

Parameters

NameType
indexNameany
queryany
optionsany

Returns

Object

NameType
hitsnever[]

Defined in

services/search.js:52


updateSettings

updateSettings(indexName, settings): void

Parameters

NameType
indexNameany
settingsany

Returns

void

Defined in

services/search.js:59