@webda/elasticsearch • Readme | API
Class: ElasticSearchService<T>
Index a Store allowing you to query it through ES
Webda Modda
Extends
Service
<T
>
Type parameters
• T extends ElasticSearchServiceParameters
= ElasticSearchServiceParameters
Constructors
new ElasticSearchService(webda, name, params)
new ElasticSearchService<
T
>(webda
,name
,params
?):ElasticSearchService
<T
>
Parameters
• webda: Core
<CoreEvents
>
The main instance of Webda
• name: string
The name of the service
• params?: DeepPartial
<T
>
The parameters block define in the configuration file
Returns
Inherited from
Service<T>.constructor
Source
core/lib/services/service.d.ts:168
Properties
_client
_client:
default
Source
elasticsearch/src/elasticsearchservice.ts:96
_createException
_createException:
string
Inherited from
Service._createException
Source
core/lib/services/service.d.ts:149
_initException
_initException:
any
Inherited from
Service._initException
Source
core/lib/services/service.d.ts:151
_initTime
_initTime:
number
Inherited from
Service._initTime
Source
core/lib/services/service.d.ts:150
_name
protected
_name:string
Service name
Inherited from
Service._name
Source
core/lib/services/service.d.ts:142
_refreshMode
_refreshMode:
boolean
|"wait_for"
=false
Source
elasticsearch/src/elasticsearchservice.ts:97
_webda
protected
_webda:Core
<CoreEvents
>
Webda Core object
Inherited from
Service._webda
Source
core/lib/services/service.d.ts:138
indexes
protected
indexes:Object
={}
Index signature
[key
: string
]: IndexInfo
Source
elasticsearch/src/elasticsearchservice.ts:98
logger
protected
logger:Logger
Logger with class context
Inherited from
Service.logger
Source
core/lib/services/service.d.ts:155
metrics?
protected
metrics?:any
Get metrics
Inherited from
Service.metrics
Source
core/lib/services/service.d.ts:159
parameters
protected
parameters:T
Hold the parameters for your service
It will be bring from the webda.config.json
Inherited from
Service.parameters
Source
core/lib/services/service.d.ts:148
captureRejectionSymbol
static
readonly
captureRejectionSymbol: typeofcaptureRejectionSymbol
Inherited from
Service.captureRejectionSymbol
Source
elasticsearch/node_modules/@types/node/events.d.ts:328
captureRejections
static
captureRejections:boolean
Sets or gets the default captureRejection value for all emitters.
Inherited from
Service.captureRejections
Source
elasticsearch/node_modules/@types/node/events.d.ts:333
defaultMaxListeners
static
defaultMaxListeners:number
Inherited from
Service.defaultMaxListeners
Source
elasticsearch/node_modules/@types/node/events.d.ts:334
errorMonitor
static
readonly
errorMonitor: typeoferrorMonitor
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Inherited from
Service.errorMonitor
Source
elasticsearch/node_modules/@types/node/events.d.ts:327
Methods
__clean()
__clean():
Promise
<void
>
Returns
Promise
<void
>
Overrides
Service.__clean
Inherit Doc
Source
elasticsearch/src/elasticsearchservice.ts:515
_addItem()
protected
_addItem(index
,uuid
,property
,item
):Promise
<void
>
Add an element to an array of the document
Parameters
• index: string
• uuid: string
• property: string
• item: any
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:326
_create()
protected
_create(index
,object
):Promise
<void
>
Create a document in the index
Parameters
• index: string
• object: CoreModel
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:402
_delete()
protected
_delete(index
,uuid
):Promise
<void
>
Delete a document from the index
Parameters
• index: string
to delete from
• uuid: string
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:388
_deleteAttribute()
protected
_deleteAttribute(index
,uuid
,property
):Promise
<void
>
Delete an attribute from a document
Parameters
• index: string
• uuid: string
• property: string
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:369
_deleteItem()
protected
_deleteItem(index
,uuid
,property
,element
):Promise
<void
>
Delete an item from an array on the document
Parameters
• index: string
• uuid: string
• property: string
• element: number
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:348
_increments()
protected
_increments(index
,uuid
,parameters
):Promise
<void
>
Increments one or several properties of an object
Parameters
• index: string
• uuid: string
• parameters: Object
[]
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:251
_update()
protected
_update(index
,object
):Promise
<void
>
Parameters
• index: string
• object: CoreModel
Returns
Promise
<void
>
Source
elasticsearch/src/elasticsearchservice.ts:411
addListener()
addListener(
eventName
,listener
):this
Alias for emitter.on(eventName, listener)
.
Parameters
• eventName: string
| symbol
• listener: (...args
) => void
Returns
this