View Source ElasticsearchEx.Deserializer (Elasticsearch_ex v1.6.0)

Converts a document or source from Elasticsearch data structures into Elixir data structures.

An example is the convertion of a range %{"gte" => first, "lte" => last} into Elixir Range or Date.Range.

Summary

Types

Represents the Elasticsearch mappings which is represented by a Map with keys as String.

Represents a list/stream of documents, a document, a document source or any values.

Functions

Deserialize a list of documents, a document or a document source.

Types

@type mappings() :: %{required(binary()) => any()}

Represents the Elasticsearch mappings which is represented by a Map with keys as String.

@type value() :: Enumerable.t() | %{required(binary()) => any()}

Represents a list/stream of documents, a document, a document source or any values.

Functions

Link to this function

deserialize(value, mappings)

View Source
@spec deserialize(value(), mappings()) :: value()

Deserialize a list of documents, a document or a document source.

Stream is also accepted and returns a Stream.