Connection.ElasticSearch (etl_core v0.1.55)

Module oriented to the creation of queries to ElasticSearch

Summary

Functions

Returns all defined indices, contained in a closed range. Use a New Vehicles service.

Returns the ElasticSearch keyword to indicate how it will be used. It will only be consulted.

Functions

Link to this function

get_from_nv(url, headers, index_for_range, start_date, end_date, index_to_return, arg)

Returns all defined indices, contained in a closed range. Use a New Vehicles service.

Parameters:

- url: String. URL of the service. It is assumed that the url contains 2 parameters to replace them: "<type_documentary>", <mode>.

- headers: List of tuple.

-index_for_range: String. Index to use to filter by range.

- start_value: String. Lower bound for filtering.

- end_value: String. Upper bound for filtering.

- index_to_return: List of string. List of indexed terms to return.

Return:

- {:ok, list of string} | {:error, string (message)}
Link to this function

get_from_nv(url, ticket, body, headers, index_to_return, from, size, total, acc)

Link to this function

get_from_range(url, headers, type_documentary, mode, init_date, end_date, index_for_range, index_to_return)

Returns all defined indices, contained in a closed range

Parameters:

- url: String. URL of the service. It is assumed that the url contains 2 parameters to replace them: "<type_documentary>", <mode>.

- headers: List of tuple.

- type_documentary: String. Documentary type.

- mode: String. ElasticSearch access mode. Default value: "_search".

- init_date: String. Range start date is included. Expected format `YYYY-MM-DDThh:mm:ss.mZ`.

- end_date: String. Range end date is included. Expected format `YYYY-MM-DDThh:mm:ss.mZ`.

- index_for_range: String. Index that allows searching by range. It must be considered in the set of ElasticSearch indexes.

- index_to_return: String. Index that will be returned for each document, according to what ElasticSearch returns.

Returns:

- Exception | List of the values of the `index_to_return` index, in each document.
Link to this function

get_indexed_indices(url, headers, type_documentary, mode \\ "_search")

Returns the indexed indices for path

Parameters:

- url: String. URL of the service. It is assumed that the url contains 2 parameters to replace them: "<type_documentary>", <mode>.

- headers: List of tuple.

- type_documentary: String. Documentary type.

- mode: String. ElasticSearch access mode. Default value `_search`.

Return:

- List of Atom | Exception

Returns the ElasticSearch keyword to indicate how it will be used. It will only be consulted.

Return:

- String. ElasticSearch reserved word.