Hemera-elasticsearch package
This is a plugin to use Elasticsearch with Hemera. This plugin based on the official driver elasticsearch.
Start elasticsearch via docker
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.2.3
Install
npm i hemera-elasticsearch --save
Usage
const hemera = natshemera
Plugin decorators
- .elasticsearch
Interface
search
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executesearch
data
: options see elasticsearch documentation
Example:
hemera
exists
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executeexists
data
: options see elasticsearch documentation
Example:
hemera
create
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executecreate
data
: options see elasticsearch documentation
Example:
hemera
delete
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executedelete
data
: options see elasticsearch documentation
Example:
hemera
update
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executeupdate
data
: options see elasticsearch documentation
Example:
hemera
count
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executecount
data
: options see elasticsearch documentation
Example:
hemera
bulk
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executebulk
data
: options see elasticsearch documentation
Example:
hemera
refresh
The pattern is:
topic
: is the service name to publish toelasticsearch
cmd
: is the command to executerefresh
data
: options see elasticsearch documentation
Example:
hemera