View Source ExlasticSearch.Indexable protocol (exlasticsearch v2.3.0)

Protocol for converting Ecto structs to ES-compatible maps.

ExlasticSearch.Repo uses this internally to effect any conversion prior to communicating with Elasticsearch itself.

Summary

Types

t()

All the types that implement this protocol.

Functions

Properties map to be inserted into ES.

Properties map to be inserted into ES.

ES record id.

Any preloads needed to call document/2.

Any preloads needed to call document/2.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

document(term)

@spec document(struct()) :: map()

Properties map to be inserted into ES.

document(term, arg2)

@spec document(
  struct(),
  atom()
) :: map()

Properties map to be inserted into ES.

id(term)

@spec id(struct()) :: binary()

ES record id.

preload(term)

@spec preload(struct()) :: struct()

Any preloads needed to call document/2.

preload(term, arg2)

@spec preload(
  struct(),
  atom()
) :: struct()

Any preloads needed to call document/2.