Skip to content

Releases: WTTJ/algoliax

v0.11.0

Choose a tag to compare

@davidjulien davidjulien released this 24 Jul 10:05
5ba74d4

What's Changed

  • feat!: replace bundled HTTP client with configurable behaviour [ROI-1838] by @davidjulien in #206

Full Changelog: v0.10.1...v0.11.0

v0.10.1

Choose a tag to compare

@quaresc quaresc released this 30 Jun 10:07
3a66193

What's Changed

  • chore(deps-dev): bump credo from 1.7.11 to 1.7.12 by @dependabot[bot] in #116
  • chore: update CODEOWNERS by @davidjulien in #138
  • chore(deps): bump hackney from 1.21.0 to 1.25.0 by @dependabot[bot] in #133
  • chore(deps-dev): bump sobelow from 0.13.0 to 0.14.0 by @dependabot[bot] in #117
  • chore(deps-dev): bump mix_test_watch from 1.2.0 to 1.3.0 by @dependabot[bot] in #123
  • chore(deps-dev): bump ex_doc from 0.37.3 to 0.38.3 by @dependabot[bot] in #137
  • chore(deps-dev): bump ex_doc from 0.38.3 to 0.38.4 by @dependabot[bot] in #139
  • chore(deps-dev): bump mix_audit from 2.1.4 to 2.1.5 by @dependabot[bot] in #124
  • chore(deps-dev): bump plug_cowboy from 2.7.3 to 2.7.4 by @dependabot[bot] in #126
  • chore(deps-dev): bump ecto_sql from 3.12.1 to 3.13.2 by @dependabot[bot] in #131
  • chore(deps): bump ecto from 3.13.2 to 3.13.3 by @dependabot[bot] in #140
  • chore(deps-dev): bump sobelow from 0.14.0 to 0.14.1 by @dependabot[bot] in #141
  • chore(deps-dev): bump credo from 1.7.12 to 1.7.13 by @dependabot[bot] in #142
  • chore(deps-dev): bump mix_test_watch from 1.3.0 to 1.4.0 by @dependabot[bot] in #143
  • chore(deps-dev): bump ex_doc from 0.38.4 to 0.39.1 by @dependabot[bot] in #144
  • chore(deps): bump ecto from 3.13.3 to 3.13.4 by @dependabot[bot] in #145
  • chore(deps): bump ecto from 3.13.4 to 3.13.5 by @dependabot[bot] in #146
  • chore(deps-dev): bump plug_cowboy from 2.7.4 to 2.7.5 by @dependabot[bot] in #147
  • chore(deps-dev): bump credo from 1.7.13 to 1.7.14 by @dependabot[bot] in #149
  • chore(deps-dev): bump ecto_sql from 3.13.2 to 3.13.3 by @dependabot[bot] in #151
  • chore(deps-dev): bump ex_doc from 0.39.1 to 0.39.3 by @dependabot[bot] in #152
  • chore(deps-dev): bump ecto_sql from 3.13.3 to 3.13.4 by @dependabot[bot] in #154
  • chore(deps-dev): bump credo from 1.7.14 to 1.7.15 by @dependabot[bot] in #153
  • chore(deps-dev): bump postgrex from 0.21.1 to 0.22.0 by @dependabot[bot] in #155
  • chore(deps-dev): bump ex_doc from 0.39.3 to 0.40.0 by @dependabot[bot] in #157
  • chore(deps-dev): bump credo from 1.7.15 to 1.7.16 by @dependabot[bot] in #159
  • chore(deps-dev): bump ex_doc from 0.40.0 to 0.40.1 by @dependabot[bot] in #160
  • chore(deps-dev): bump plug_cowboy from 2.7.5 to 2.8.0 by @dependabot[bot] in #162
  • chore(deps-dev): bump ecto_sql from 3.13.4 to 3.13.5 by @dependabot[bot] in #167
  • chore(deps-dev): bump credo from 1.7.16 to 1.7.17 by @dependabot[bot] in #168
  • chore(deps-dev): bump credo from 1.7.17 to 1.7.18 by @dependabot[bot] in #170
  • chore: remove Dependabot and pin dependencies (PLA-987) by @ColasRIP in #169
  • chore(deps): update [mix] plug_cowboy (2.8.0 → 2.8.1) [security] by @wttj-bot[bot] in #176
  • chore(deps): update [mix] postgrex (0.22.0 → 0.22.2) [security] by @wttj-bot[bot] in #190
  • chore(deps): lock file maintenance [mix] (mix.exs) by @wttj-bot[bot] in #185
  • chore: bump hackney to 4.0.1 & plug_cowboy to 2.9 by @quaresc in #198
  • chore: v0.10.1 release by @quaresc in #199

Full Changelog: v0.10.0...v0.10.1

v0.10.0

Choose a tag to compare

@Jordan-Kowal Jordan-Kowal released this 10 Mar 09:35
09c24d5

New

Added the synonyms settings to the Algoliax.Indexer.
It allows you to automatically setup synonyms for your indexes when calling MyIndexer.configure_index()

If not specified or set to nil, the synonyms will not be configured.
Otherwise, the following keywords are expected, with each key having a default value:

  • synonyms: a list of synonym groups, as expected by Algolia. Default []
  • replace_existing_synonyms: Whether to replace existing synonyms. Default true
  • forward_to_replicas: Whether to forward synonyms to replicas. Default true

You can also provide an arity-1 function (that takes the index_name) that returns the same keyword list.

If using forward_to_replicas: true, make sure not to specify synonyms on the replicas themselves to avoid conflicts/overwrites.

  defmodule Global do
    use Algoliax.Indexer,
      index_name: :people,
      object_id: :reference,
      schemas: People,
      algolia: [
        attribute_for_faceting: ["age"],
        custom_ranking: ["desc(updated_at)"]
      ]
      synonyms: [
        synonyms: [
          %{
            objectID: "synonym1",
            type: "synonym",
            synonyms: ["pants", "trousers", "slacks"],
            ...
          },
          %{
            objectID: "synonym2",
            ...
          }
        ],
        forward_to_replicas: false,
        replace_existing_synonyms: false
      ]
  end

PRs

Deps

Full Changelog: v0.9.1...v0.10.0

v0.9.1

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

v0.9.0

Choose a tag to compare

@davidjulien davidjulien released this 26 Nov 07:42
b895088

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

Choose a tag to compare

@Jordan-Kowal Jordan-Kowal released this 15 Oct 12:14
5ad14a6

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

Choose a tag to compare

@Jordan-Kowal Jordan-Kowal released this 16 Sep 08:11
e445bff
  • Upgrading all dependencies
  • Added dependabot to the repository

v0.8.1

Choose a tag to compare

@Jordan-Kowal Jordan-Kowal released this 11 Sep 13:14
b55b2d3

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

Choose a tag to compare

@Jordan-Kowal Jordan-Kowal released this 11 Sep 09:16
772f6bf

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

Choose a tag to compare

@StephaneRob StephaneRob released this 29 Mar 12:43

Breaking changes

Bug fix

  • Ensure clean up on reindex fail