Changelog

Copy Markdown

0.4.0

Breaking change

Joins per facet

Joins are now configured per facet, instead of once at the top level. Each facet carries its own joins chain from the source to the table its value comes from.

This removes a previous limitation: with a single top-level joins list, every faceted joined column had to lie on one shared path. Facets can now fetch data from independent relations. For example, over a articles source table, one facet joining to authors and another joining through article_categories to categories.

Migration:

Move each joins list from the top level into the facet that uses it.

If several facets shared one top-level joins, give each facet the portion of the chain up to its own join_table.

Before

%{
  facets_table: "authors_facets",
  source_table: "authors",
  facets: [
    %{
      facet_name: "role_name",
      join_table: "roles",
      value_column: "name"
    }
  ],
  joins: [
    %{table: "roles", match: "roles.id", to: "authors.role_id"}
  ]
}

After

%{
  facets_table: "authors_facets",
  source_table: "authors",
  facets: [
    %{
      facet_name: "role_name",
      join_table: "roles",
      value_column: "name",
      joins: [
        %{table: "roles", match: "roles.id", to: "authors.role_id"}
      ]
    }
  ]
}

Internal

Trigger logic has moved to separate helper library Sublimate ➚.

0.3.0

Search updates

  • Adds search option order_by. This includes support for mult-column sorting and null-ordering directions.
  • Breaking changes:
    • The search option facets now accepts a string-keyed map instead of an atom-keyed map. This enables search options to be created directly from external sources, such as URL parameters, without converting string keys to atoms first.
    • Similarly, the search option result_fields now accepts a list of strings instead of a list of atoms.

Searching

Flop adapter

Adds a Flop adapter for using Flop ➚ with Refine.

The adapter translates Flop parameters into a Refine faceted search: Flop provides filtering, ordering, and pagination, while Refine provides the facets. This is useful when you already use Flop for searching and want to add faceting to existing queries.

Flop adapter

0.2.0

Facets can now be created from joined tables

0.1.0

Initial implementation.