SearchService
Hierarchy
AbstractSearchService
↳
SearchService
Constructors
constructor
new SearchService(«destructured»
, options
)
Parameters
Name |
---|
«destructured» |
options |
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
>
-Record
:
-string
: (optional)
-unknown
: (optional)
Inherited from
AbstractSearchService.options
Defined in
utils/dist/search/abstract-service.d.ts:5
Methods
addDocuments
addDocuments(indexName
, documents
, type
): Promise
<void
>
Parameters
Name |
---|
indexName |
documents |
type |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.addDocuments
Defined in
medusa/src/services/search.ts:40
createIndex
createIndex(indexName
, options
): Promise
<void
>
Parameters
Name |
---|
indexName |
options |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.createIndex
Defined in
medusa/src/services/search.ts:28
deleteAllDocuments
deleteAllDocuments(indexName
): Promise
<void
>
Parameters
Name |
---|
indexName |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.deleteAllDocuments
Defined in
medusa/src/services/search.ts:69
deleteDocument
deleteDocument(indexName
, document_id
): Promise
<void
>
Parameters
Name |
---|
indexName |
document_id |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.deleteDocument
Defined in
medusa/src/services/search.ts:60
getIndex
getIndex(indexName
): Promise
<void
>
Parameters
Name |
---|
indexName |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.getIndex
Defined in
medusa/src/services/search.ts:34
replaceDocuments
replaceDocuments(indexName
, documents
, type
): Promise
<void
>
Parameters
Name |
---|
indexName |
documents |
type |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.replaceDocuments
Defined in
medusa/src/services/search.ts:50
search
search(indexName
, query
, options
): Promise
<{ hits
: unknown
[] }>
Parameters
Name |
---|
indexName |
query |
options |
Returns
Promise
<{ hits
: unknown
[] }>
-Promise
:
-object
: (optional)
Overrides
AbstractSearchService.search
Defined in
medusa/src/services/search.ts:75
updateSettings
updateSettings(indexName
, settings
): Promise
<void
>
Parameters
Name |
---|
indexName |
settings |
Returns
Promise
<void
>
-Promise
:
Overrides
AbstractSearchService.updateSettings