Runtime reflection helpers for searchable schemas declared with use Scrypath.
Phase 1 keeps the public runtime surface small:
schema_config/1schema_fields/1schema_settings/1schema_faceting/1document_source/1document_id_field/1
These functions keep reflection under Scrypath.* modules instead of generating
schema-specific runtime verbs.
Examples
iex> config = Scrypath.schema_config(SearchablePost)
iex> config.fields
[:title, :body]
Summary
Functions
Returns failed or retrying sync work rows for a schema.
Returns normalized faceting: options for the schema, or [] when faceting is disabled.
Federated search across multiple schemas.
Functions
@spec failed_sync_work( module(), keyword() ) :: {:ok, [Scrypath.Operator.FailedWork.t()]} | {:ok, Scrypath.Operator.FailedSyncWorkInspection.t()} | {:error, term()}
Returns failed or retrying sync work rows for a schema.
Reason class rollups
Pass reason_class_counts: true in operator options (alongside runtime
config) to receive {:ok, %Scrypath.Operator.FailedSyncWorkInspection{}}
with entries (the row list) and counts — a
%Scrypath.Operator.ReasonClassCounts{} with dense per-class frequencies.
The default remains {:ok, [FailedWork.t()]} when this option is omitted.
@spec reconcile_sync( module(), keyword() ) :: {:ok, Scrypath.Operator.Reconcile.t()} | {:error, term()} | {:ok, map()}
@spec retry_sync_work( Scrypath.Operator.FailedWork.t() | Scrypath.Operator.RecoveryAction.t(), keyword() ) :: {:ok, map()} | {:error, term()}
Returns normalized faceting: options for the schema, or [] when faceting is disabled.
Shape when enabled is a keyword list with :attributes, :max_values_per_facet, and
:sort_facet_values_by.
Federated search across multiple schemas.
Returns an ok tuple whose success value is the library's federated multi-search result struct, or an error tuple on validation, transport, or complete failure.
@spec sync_status( module(), keyword() ) :: {:ok, Scrypath.Operator.Status.t()} | {:error, term()}