Skip to content

v0.9.1

Latest
Compare
Choose a tag to compare
@Jordan-Kowal Jordan-Kowal released this 12 Dec 17:45
2cf187f

New

The Algoliax.Indexer now supports dynamic definition for the :algolia settings. It can supports 2 types of configurations:

  • (Existing) Keyword list
  • (New) Name of a 0-arity function that returns a keyword list
defmodule People do
  use Algoliax.Indexer,
    index_name: :people,
    object_id: :reference,
    schemas: [People],
    algolia: :runtime_algolia

  def runtime_algolia do
    [
      attribute_for_faceting: ["age"],
      custom_ranking: ["desc(updated_at)"]
    ]
  end
end

Also added 2 new exceptions for the :algolia configuration: InvalidAlgoliaSettingsFunctionError and InvalidAlgoliaSettingsConfigurationError

Other changes

Existing direct calls to Algoliax.Settings.replica_settings/2 will still work but will not benefit from
the dynamic :algolia configuration. Please use Algoliax.Settings.replica_settings/3 instead.

PR details

Full Changelog: v0.9.0...v0.9.1