API Reference Algoliax v0.10.0

View Source

Modules

Algoliax is wrapper for Algolia api

Raise Algolia API error

Usage

  • :index_name: specificy the index or a list of indexes where the object will be added on. Required
  • :object_id: specify the attribute used to as algolia objectID. Default :id.
  • :repo: Specify an Ecto repo to be use to fecth records. Default nil
  • :cursor_field: specify the column to be used to order and go through a given table. Default :id
  • :schemas: Specify which schemas used to populate index, Default: [__CALLER__]
  • :default_filters: Specify default filters to be used when reindex without providing a query. Must be a map or a function name (that returns a map). Default: %{}.
  • :algolia: Any valid Algolia settings (using snake case or camel case, ie attributeForFaceting can be configured with :attribute_for_faceting) or the name of 0-arity function that returns those settings.
  • :synonyms: Custom configuration for the synonym API, allowing you to register your synonyms. Can be nil, a keyword list, or an arity-1 function that returns either. Default: nil

On first call to Algolia, we check that the settings on Algolia are up to date.

Raise when the :algolia settings are unsupported

Raise when dynamic :algolia settings are invalid

Raise when trying to generate a secured api key with invalid params

Raise when a replica has an invalid configuration

Raise when the :synonyms settings are not defined properly

Raise when dynamic :synonyms settings are invalid

Raise when trying to use algoliax without defining an index name

Raise when trying to use ecto specific functions without defining a repo

Algolia API response

Algolia API responses

Execute save_object(s) on temporary index to keep it synchronized with main index