Skip to content

Releases: WTTJ/algoliax

v0.9.1

12 Dec 17:45
2cf187f
Compare
Choose a tag to compare

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

v0.9.0

26 Nov 07:42
b895088
Compare
Choose a tag to compare

Breaking change

ALGOLIA_API_KEY and ALGOLIA_APPLICATION_ID aren't read anymore from system env variables inside the code. Only application config is now used (as documented).

If you used these env vars, you should now read them inside the config:

config :algoliax,
  api_key: System.get_env("ALGOLIA_API_KEY"),
  application_id: System.get_env("ALGOLIA_APPLICATION_ID")

What's Changed

  • chore(deps-dev): bump postgrex from 0.19.1 to 0.19.2 in the patches group by @dependabot in #80
  • chore(deps-dev): bump credo from 1.7.8 to 1.7.9 in the patches group by @dependabot in #81
  • chore: standardize dependabot config by @davidjulien in #84
  • chore: add workflow to publish package on release by @davidjulien in #82
  • chore: add CODEOWNERS by @davidjulien in #83
  • chore(deps-dev): bump credo from 1.7.9 to 1.7.10 by @dependabot in #85
  • chore: update publish_public_package workflow by @davidjulien in #86
  • chore(deps-dev): bump postgrex from 0.19.2 to 0.19.3 by @dependabot in #87
  • chore(deps-dev): bump ex_doc from 0.34.2 to 0.35.0 by @dependabot in #88
  • chore(deps-dev): bump ex_doc from 0.35.0 to 0.35.1 by @dependabot in #89
  • feat: don't read anymore ALGOLIA_API_KEY and ALGOLIA_APPLICATION_ID env vars in code by @davidjulien in #90
  • feat: read algolia mock port from application config during tests by @davidjulien in #91
  • chore: new version 0.9.0 by @davidjulien in #92

New Contributors

Full Changelog: v0.8.3...v0.9.0

v0.8.3

15 Oct 12:14
5ad14a6
Compare
Choose a tag to compare

New

  • New if option for replicas which decides if they should be updated or not.
    • If not provided, the replica will be updated (so no impact on existing configurations)
    • Must be nil|true|false or the name (atom) of a arity-0 func which returns a boolean
    • If provided, the replica will be updated only if the value is true or the function returns true

Other changes

  • chore(deps): bump inflex from 2.0.0 to 2.1.0 in the minors group by @dependabot in #76
  • chore(deps-dev): bump credo from 1.7.7 to 1.7.8 in the patches group by @dependabot in #77
  • chore(deps): bump the patches group with 2 updates by @dependabot in #78

New Contributors

Full Changelog: v0.8.2...v0.8.3

v0.8.2

16 Sep 08:11
e445bff
Compare
Choose a tag to compare
  • Upgrading all dependencies
  • Added dependabot to the repository

v0.8.1

11 Sep 13:14
b55b2d3
Compare
Choose a tag to compare

New

  • Added new optional settings default_filters to be applied automatically when calling reindex without query
    or reindex_atomic. Defaults to %{} which was the previous behavior.
defmodule BlondeBeerIndexer do
  use Algoliax.Indexer,
    index_name: :blonde_beers,
    object_id: :name,
    schemas: [Beer],
    default_filters: %{where: [kind: "blonde"]} # <---
end

defmodule BeerIndexer do
  use Algoliax.Indexer,
    index_name: :various_beers,
    object_id: :name,
    schemas: [Beer1, Beer2, Beer3],
    default_filters: :get_filters # <--- can be a function

  def get_filters do
    %{
      Beer1 => %{where: [kind: "blonde"]},  # <--- custom filter for Beer1
      :where => [kind: "brune"] # <--- Will be used for Beer2 and Beer3
    }
  end
end

Contributing

  • New CONTRIBUTING.md file
  • Simplified the config/test.exs file
  • Provide a .env.example file to help contributors to setup their environment

v0.8.0

11 Sep 09:16
772f6bf
Compare
Choose a tag to compare

Breaking changes

  • Errors for get_object and get_objects are now of arity 4 and returns the original request as last attribute

New

  • Added possibility to have multiple indexes for a model (applies for replicas as well)
  • Added build_object/2 with the index name as second parameter (useful for translations for example)

v0.7.1

29 Mar 12:43
Compare
Choose a tag to compare

Breaking changes

Bug fix

  • Ensure clean up on reindex fail

v0.6.0

10 Jun 14:15
Compare
Choose a tag to compare

Changelog

v0.6.0

Updates

  • Replace deprecated hmac function with new :crypto API mac function to support OTP-24

Breaking changes

  • Drop support for OTP 21. OTP 22+ is now required.

v0.5.0

05 Mar 08:55
ccb6644
Compare
Choose a tag to compare
v0.5.0

v0.4.3

31 Aug 07:10
Compare
Choose a tag to compare
v0.4.3