Class: SearchService
Hierarchy
AbstractSearchService
↳
SearchService
Constructors
constructor
• new SearchService(__namedParameters
, options
)
Parameters
Name | Type |
---|---|
__namedParameters | InjectedDependencies |
options | any |
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
Name | Type |
---|---|
indexName | string |
documents | unknown |
type | string |
Returns
Promise
<void
>
Overrides
AbstractSearchService.addDocuments
Defined in
medusa/src/services/search.ts:40
createIndex
▸ createIndex(indexName
, options
): Promise
<void
>
Parameters
Name | Type |
---|---|
indexName | string |
options | unknown |
Returns
Promise
<void
>
Overrides
AbstractSearchService.createIndex
Defined in
medusa/src/services/search.ts:28
deleteAllDocuments
▸ deleteAllDocuments(indexName
): Promise
<void
>
Parameters
Name | Type |
---|---|
indexName | string |
Returns
Promise
<void
>
Overrides
AbstractSearchService.deleteAllDocuments
Defined in
medusa/src/services/search.ts:69
deleteDocument
▸ deleteDocument(indexName
, document_id
): Promise
<void
>
Parameters
Name | Type |
---|---|
indexName | string |
document_id | string | number |
Returns
Promise
<void
>
Overrides
AbstractSearchService.deleteDocument
Defined in
medusa/src/services/search.ts:60
getIndex
▸ getIndex(indexName
): Promise
<void
>
Parameters
Name | Type |
---|---|
indexName | string |
Returns
Promise
<void
>
Overrides
AbstractSearchService.getIndex
Defined in
medusa/src/services/search.ts:34
replaceDocuments
▸ replaceDocuments(indexName
, documents
, type
): Promise
<void
>
Parameters
Name | Type |
---|---|
indexName | string |
documents | unknown |
type | string |
Returns
Promise
<void
>
Overrides
AbstractSearchService.replaceDocuments
Defined in
medusa/src/services/search.ts:50
search
▸ search(indexName
, query
, options
): Promise
<{ hits
: unknown
[] }>
Parameters
Name | Type |
---|---|
indexName | string |
query | unknown |
options | unknown |
Returns
Promise
<{ hits
: unknown
[] }>
Overrides
AbstractSearchService.search
Defined in
medusa/src/services/search.ts:75
updateSettings
▸ updateSettings(indexName
, settings
): Promise
<void
>
Parameters
Name | Type |
---|---|
indexName | string |
settings | unknown |
Returns
Promise
<void
>
Overrides
AbstractSearchService.updateSettings