Scrypath.MultiSearch.Entries (scrypath v0.3.5)

Copy Markdown View Source

Normalizes search_many/2 entry tuples and shared runtime options.

Shared and per-entry keyword options merge with per-key right bias: when both sides define the same top-level key, the entry value wins (same as Keyword.merge/3 with a conflict function returning the entry side).

Summary

Functions

Normalizes entries with shared_opts, returning {:ok, list} of {schema, text, merged_opts, fed_opts} in declaration order.

Functions

normalize(entries, shared_opts)

@spec normalize(
  list(),
  keyword()
) :: {:ok, [{module(), String.t(), keyword(), keyword()}]} | {:error, term()}

Normalizes entries with shared_opts, returning {:ok, list} of {schema, text, merged_opts, fed_opts} in declaration order.

fed_opts is [] or [federation_weight: float] (per-entry merge weight for federated multi-search). :federation_weight is never present on merged_opts.