View Source EctoTypesense.Schema.DocumentProtocol protocol (ecto_typesense v0.9.0)

Link to this section Summary

Functions

Used to convert Ecto schemas into Maps to pass to Typesense. This is implemented as a protocol instead of just Jason derive, because you may want to load more content before indexing something.

Link to this section Types

Link to this section Functions

@spec coerce(Ecto.Schema.t()) :: binary()

Used to convert Ecto schemas into Maps to pass to Typesense. This is implemented as a protocol instead of just Jason derive, because you may want to load more content before indexing something.

@spec id(Ecto.Schema.t()) :: binary()