Refine. Search
(Refine v0.4.0)
Copy Markdown
Search functions.
Summary
Types
@type create_facets_table_return() :: {:ok, String.t()} | {:error, :column_not_found, String.t()} | {:error, :identity_column_already_exists, String.t()} | {:error, :identity_column_invalid_type, String.t()} | {:error, :identity_column_not_found, String.t()} | {:error, :invalid_table_name, String.t()} | {:error, :table_names_not_distinct} | {:error, :facets_table_exists, String.t()} | {:error, Exception.t()}
@type facet_configs() :: [facet_config()]
@type order_by_entry() :: {String.t(), order_direction()} | {String.t(), order_direction(), sort_nulls()}
@type order_direction() :: :asc | :desc
@type repo() :: module()
@type search_option() :: {:facets, map()} | {:limit, integer()} | {:offset, integer()} | {:order_by, [order_by_entry()]} | {:query, Ecto.Query.t()} | {:repo, repo()} | {:result_fields, [String.t()]} | postgrex_options()
@type search_options() :: [search_option()]
@type search_return() :: {:ok, search_return_data()} | {:error, Exception.t()}
@type sort_nulls() :: :first | :last | :default
Functions
@spec search(facets_table_config(), search_options()) :: search_return()
See: Refine.search/2.