Fields

Utilized by the QueryBuilder to optionally restrict the fields returned by an Elastic query.

class es_fluent.fields.Field(name)[source]

Bases: object

Manages a basic field. These occur inside of an elasticsearch fields array.

class es_fluent.fields.Fields[source]

Bases: object

Represents a collection of fields to be requested at query time.

add_field(field_instance_or_string)[source]

Appends a field, can be a Field or string.

is_empty()[source]

Returns False if no fields have been added, True otherwise.

to_query()[source]

Serializes this into a json-serializable dictionary suitable for use with the elasticsearch api.