Module cloudi_service_db_elasticsearch

CloudI ErlasticSearch Data Module

.

Copyright © 2013 Mahesh Paolini-Subramanya

Version: 1.3.0 Sep 30 2014 14:10:19 ------------------------------------------------------------------------

Behaviours: cloudi_service.

Authors: Mahesh Paolini-Subramanya (mahesh@dieswaytoofast.com).

Description

CloudI ErlasticSearch Data Module

Data Types

dispatcher()

dispatcher() = cloudi_service:dispatcher() | cloudi:context()

doc()

doc() = binary()

error()

error() = {error, Reason::term()}

id()

id() = binary() | undefined

index()

index() = binary()

name()

name() = cloudi_service:service_name()

node_name()

node_name() = binary()

params()

params() = [tuple()]

response()

response() = [tuple()] | error()

type()

type() = binary()

Function Index

aliases/3Operate on aliases (as compared to 'alias').
clear_cache/2Clear all the caches.
clear_cache/3
clear_cache/4
close_index/3Close an index in the ElasticSearch cluster.
cloudi_service_handle_info/3
cloudi_service_handle_request/11
cloudi_service_init/3
cloudi_service_terminate/2
count/3
count/4
count/5
count/6Get the number of matches for a query.
create_index/3
create_index/4Create an index in the ElasticSearch cluster.
delete_alias/4Delete an alias (as compared to 'aliases').
delete_by_query/3
delete_by_query/4
delete_by_query/5
delete_by_query/6Get the number of matches for a query.
delete_doc/5
delete_doc/6Delete a doc from the ElasticSearch cluster.
delete_index/2Delete all the indices in the ElasticSearch cluster.
delete_index/3Delete an index(es) in the ElasticSearch cluster.
delete_mapping/4Delete a mapping from an ElasticSearch index.
flush/2Flush all indices _equiv flush(Dispatcher, Name, ?ALL).
flush/3Flush one or more indices.
get_alias/4Gets an alias(or more, based on the string).
get_doc/5
get_doc/6Get a doc from the ElasticSearch cluster.
get_mapping/4Get a mapping from an ElasticSearch index.
health/2Get the health the ElasticSearch cluster.
insert_alias/4Insert an alias (as compared to 'aliases').
insert_alias/5Insert an alias with options(as compared to 'aliases').
insert_doc/6
insert_doc/7Insert a doc into the ElasticSearch cluster.
is_alias/4Checks if an alias exists (Alias can be a string with a wildcard).
is_doc/5Checks to see if the doc exists.
is_index/3Check if an index/indices exists in the ElasticSearch cluster.
is_type/4Check if a type exists in an index/indices in the ElasticSearch cluster.
mget_doc/3
mget_doc/4
mget_doc/5Get a doc from the ElasticSearch cluster.
nodes_info/2
nodes_info/3
nodes_info/4Get the nodes_info of the ElasticSearch cluster.
nodes_stats/2
nodes_stats/3
nodes_stats/4Get the nodes_stats of the ElasticSearch cluster.
open_index/3Open an index in the ElasticSearch cluster.
optimize/2Optimize all indices.
optimize/3Optimize one or more indices.
put_mapping/5Insert a mapping into an ElasticSearch index.
refresh/2Refresh all indices.
refresh/3Refresh one or more indices.
search/5
search/6Search for docs in the ElasticSearch cluster.
segments/2Optimize all indices.
segments/3Optimize one or more indices.
state/2
state/3Get the state of the ElasticSearch cluster.
status/3Get the status of an index/indices in the ElasticSearch cluster.
update_doc/6
update_doc/7Insert a doc into the ElasticSearch cluster.

Function Details

aliases/3

aliases(Dispatcher::dispatcher(), Name::name(), Doc::doc()) -> {ok, response()} | {error, any()}

Operate on aliases (as compared to 'alias')

clear_cache/2

clear_cache(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Clear all the caches

clear_cache/3

clear_cache(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

clear_cache/4

clear_cache(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Params::params()) -> {ok, response()} | {error, any()}

close_index/3

close_index(Dispatcher::dispatcher(), Name::name(), Index::index()) -> {ok, response()} | {error, any()}

Close an index in the ElasticSearch cluster

cloudi_service_handle_info/3

cloudi_service_handle_info(Request, State, X3) -> any()

cloudi_service_handle_request/11

cloudi_service_handle_request(Type, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()

cloudi_service_init/3

cloudi_service_init(Args, Prefix, Dispatcher) -> any()

cloudi_service_terminate/2

cloudi_service_terminate(X1, State) -> any()

count/3

count(Dispatcher::dispatcher(), Name::name(), Doc::doc()) -> {ok, boolean()} | {error, any()}

count/4

count(Dispatcher::dispatcher(), Name::name(), Doc::doc(), Params::params()) -> {ok, boolean()} | {error, any()}

count/5

count(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Doc::doc(), Params::params()) -> {ok, boolean()} | {error, any()}

count/6

count(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Type::type() | [type()], Doc::doc(), Params::params()) -> {ok, boolean()} | {error, any()}

Get the number of matches for a query

create_index/3

create_index(Dispatcher::dispatcher(), Name::name(), Index::index()) -> {ok, response()} | {error, any()}

create_index/4

create_index(Dispatcher::dispatcher(), Name::name(), Index::index(), Doc::doc()) -> {ok, response()} | {error, any()}

Create an index in the ElasticSearch cluster

delete_alias/4

delete_alias(Dispatcher::dispatcher(), Name::name(), Index::index(), Alias::index()) -> {ok, response()} | {error, any()}

Delete an alias (as compared to 'aliases')

delete_by_query/3

delete_by_query(Dispatcher::dispatcher(), Name::name(), Doc::doc()) -> {ok, boolean()} | {error, any()}

delete_by_query/4

delete_by_query(Dispatcher::dispatcher(), Name::name(), Doc::doc(), Params::params()) -> {ok, boolean()} | {error, any()}

delete_by_query/5

delete_by_query(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Doc::doc(), Params::params()) -> {ok, boolean()} | {error, any()}

delete_by_query/6

delete_by_query(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Type::type() | [type()], Doc::doc(), Params::params()) -> {ok, boolean()} | {error, any()}

Get the number of matches for a query

delete_doc/5

delete_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id()) -> {ok, response()} | {error, any()}

delete_doc/6

delete_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id(), Params::params()) -> {ok, response()} | {error, any()}

Delete a doc from the ElasticSearch cluster

delete_index/2

delete_index(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Delete all the indices in the ElasticSearch cluster

delete_index/3

delete_index(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

Delete an index(es) in the ElasticSearch cluster

delete_mapping/4

delete_mapping(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Type::type()) -> {ok, response()} | {error, any()}

Delete a mapping from an ElasticSearch index

flush/2

flush(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Flush all indices _equiv flush(Dispatcher, Name, ?ALL).

flush/3

flush(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

Flush one or more indices

get_alias/4

get_alias(Dispatcher::dispatcher(), Name::name(), Index::index(), Alias::index()) -> {ok, response()} | {error, any()}

Gets an alias(or more, based on the string)

get_doc/5

get_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id()) -> {ok, response()} | {error, any()}

get_doc/6

get_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id(), Params::params()) -> {ok, response()} | {error, any()}

Get a doc from the ElasticSearch cluster

get_mapping/4

get_mapping(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Type::type()) -> {ok, response()} | {error, any()}

Get a mapping from an ElasticSearch index

health/2

health(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Get the health the ElasticSearch cluster

insert_alias/4

insert_alias(Dispatcher::dispatcher(), Name::name(), Index::index(), Alias::index()) -> {ok, response()} | {error, any()}

Insert an alias (as compared to 'aliases')

insert_alias/5

insert_alias(Dispatcher::dispatcher(), Name::name(), Index::index(), Alias::index(), Doc::doc()) -> {ok, response()} | {error, any()}

Insert an alias with options(as compared to 'aliases')

insert_doc/6

insert_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id(), Doc::doc()) -> {ok, response()} | {error, any()}

insert_doc/7

insert_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id(), Doc::doc(), Params::params()) -> {ok, response()} | {error, any()}

Insert a doc into the ElasticSearch cluster

is_alias/4

is_alias(Dispatcher::dispatcher(), Name::name(), Index::index(), Alias::index()) -> {ok, response()} | {error, any()}

Checks if an alias exists (Alias can be a string with a wildcard)

is_doc/5

is_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id()) -> {ok, response()} | {error, any()}

Checks to see if the doc exists

is_index/3

is_index(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, boolean()} | {error, any()}

Check if an index/indices exists in the ElasticSearch cluster

is_type/4

is_type(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Type::type() | [type()]) -> {ok, boolean()} | {error, any()}

Check if a type exists in an index/indices in the ElasticSearch cluster

mget_doc/3

mget_doc(Dispatcher::dispatcher(), Name::name(), Doc::doc()) -> {ok, response()} | {error, any()}

mget_doc/4

mget_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Doc::doc()) -> {ok, response()} | {error, any()}

mget_doc/5

mget_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Doc::doc()) -> {ok, response()} | {error, any()}

Get a doc from the ElasticSearch cluster

nodes_info/2

nodes_info(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

nodes_info/3

nodes_info(Dispatcher::dispatcher(), Name::name(), NodeName::node_name()) -> {ok, response()} | {error, any()}

nodes_info/4

nodes_info(Dispatcher::dispatcher(), Name::name(), NodeNames::[node_name()], Params::params()) -> {ok, response()} | {error, any()}

Get the nodes_info of the ElasticSearch cluster

nodes_stats/2

nodes_stats(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

nodes_stats/3

nodes_stats(Dispatcher::dispatcher(), Name::name(), NodeName::node_name()) -> {ok, response()} | {error, any()}

nodes_stats/4

nodes_stats(Dispatcher::dispatcher(), Name::name(), NodeNames::[node_name()], Params::params()) -> {ok, response()} | {error, any()}

Get the nodes_stats of the ElasticSearch cluster

open_index/3

open_index(Dispatcher::dispatcher(), Name::name(), Index::index()) -> {ok, response()} | {error, any()}

Open an index in the ElasticSearch cluster

optimize/2

optimize(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Optimize all indices

optimize/3

optimize(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

Optimize one or more indices

put_mapping/5

put_mapping(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()], Type::type(), Doc::doc()) -> {ok, response()} | {error, any()}

Insert a mapping into an ElasticSearch index

refresh/2

refresh(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Refresh all indices

refresh/3

refresh(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

Refresh one or more indices

search/5

search(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Doc::doc()) -> {ok, response()} | {error, any()}

search/6

search(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Doc::doc(), Params::params()) -> {ok, response()} | {error, any()}

Search for docs in the ElasticSearch cluster

segments/2

segments(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

Optimize all indices

segments/3

segments(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

Optimize one or more indices

state/2

state(Dispatcher::dispatcher(), Name::name()) -> {ok, response()} | {error, any()}

state/3

state(Dispatcher::dispatcher(), Name::name(), Params::params()) -> {ok, response()} | {error, any()}

Get the state of the ElasticSearch cluster

status/3

status(Dispatcher::dispatcher(), Name::name(), Index::index() | [index()]) -> {ok, response()} | {error, any()}

Get the status of an index/indices in the ElasticSearch cluster

update_doc/6

update_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id(), Doc::doc()) -> {ok, response()} | {error, any()}

update_doc/7

update_doc(Dispatcher::dispatcher(), Name::name(), Index::index(), Type::type(), Id::id(), Doc::doc(), Params::params()) -> {ok, response()} | {error, any()}

Insert a doc into the ElasticSearch cluster


Generated by EDoc, Sep 30 2014, 14:10:19.