Statement.Elastic (etl_core v0.1.54)

Module oriented to the creation of queries to Elastic

Link to this section Summary

Functions

Returns the most generic query possible: all nodes with their indexed terms

Returns a query, where it is defined to return only an indexed field, filters those such that the field deleted=false and a certain field is in a range

Returns a query that will be used within another. Particular case for the New Vehicles service

Link to this section Functions

Link to this function

build_query(size)

Returns the most generic query possible: all nodes with their indexed terms

parameter

Parameter:

- size: Integer. Number of records to return.

return

Return:

- String
Link to this function

build_query(index_to_return, index_for_range, lower_bound, upper_bound, from \\ 0, size \\ 100)

Returns a query, where it is defined to return only an indexed field, filters those such that the field deleted=false and a certain field is in a range

parameters

Parameters:

- index_to_return: String. Indexed field that will only contain the response.

- index_for_range: String. indexed field that will be used to establish a search range.

- lower_bound: String. Lower bound of the range.

- upper_bound: String. Upper bound of the range.

- from: Integer. Position, after obtaining the ordered response, by which the values to be displayed will begin to be taken.

- size: Integer. Amount of values to take, after the defined position.

return

Return:

- String
Link to this function

build_query_inside(index_for_range, lower_bound, upper_bound)

Returns a query that will be used within another. Particular case for the New Vehicles service

parameters

Parameters:

- index_for_range: String. indexed field that will be used to establish a search range.

- lower_bound: String. Lower bound of the range.

- upper_bound: String. Upper bound of the range.

return

Return:

- String