SearchAsh.Source.Info (search_ash v0.4.2)

Copy Markdown View Source

Read a resource's searchable do … end configuration.

Summary

Functions

Archived resolver: nil, an attribute name (truthiness), or a record -> boolean.

Max length of the stored excerpt, or nil when no excerpt is stored.

The extra_text entries: derived text contributions, each with its rank class.

The index_attribute entries: extra index columns filled from the record.

The static language fixed for every row of this resource, or nil when the language is read per-row from language_attribute/1.

Attribute holding each row's language, defaulting to :language.

Whether language_attribute was set explicitly, as opposed to falling back to :language.

Ash load statement applied to the record before building its document, or nil.

:remove or :archive — index behaviour when the source is destroyed.

Per-field rank weights (%{field => :a | :b | :c | :d}); unlisted fields are :d.

Functions

archived(resource)

Archived resolver: nil, an attribute name (truthiness), or a record -> boolean.

excerpt_length(resource)

Max length of the stored excerpt, or nil when no excerpt is stored.

extra_texts(resource)

The extra_text entries: derived text contributions, each with its rank class.

fields(resource)

index(resource)

index_attributes(resource)

The index_attribute entries: extra index columns filled from the record.

label_field(resource)

language(resource)

The static language fixed for every row of this resource, or nil when the language is read per-row from language_attribute/1.

language_attribute(resource)

Attribute holding each row's language, defaulting to :language.

Only meaningful when language/1 is nil; the two are mutually exclusive.

language_attribute_configured?(resource)

Whether language_attribute was set explicitly, as opposed to falling back to :language.

load(resource)

Ash load statement applied to the record before building its document, or nil.

on_destroy(resource)

:remove or :archive — index behaviour when the source is destroyed.

source_type(resource)

weights(resource)

Per-field rank weights (%{field => :a | :b | :c | :d}); unlisted fields are :d.