View Source Meilisearch.Settings.SearchableAttributes (meilisearch_ex v1.0.0)

Link to this section Summary

Functions

Get searchable attributes settings of an Index of your Meilsiearch instance. meili doc

Reset searchable attributes settings of an Index of your Meilsiearch instance. meili doc

Update searchable attributes settings of an Index of your Meilsiearch instance. meili doc

Link to this section Functions

@spec get(Tesla.Client.t(), String.t()) ::
  {:ok, [String.t()]} | {:error, Meilisearch.Client.error()}

Get searchable attributes settings of an Index of your Meilsiearch instance. meili doc

examples

Examples

iex> client = Meilisearch.Client.new(endpoint: "http://localhost:7700", key: "master_key_test")
iex> Meilisearch.Settings.SearchableAttributes.get(client, "movies")
{:ok, ["title", "overview", "genres", "release_date.year"]}
Link to this function

reset(client, index_uid)

View Source

Reset searchable attributes settings of an Index of your Meilsiearch instance. meili doc

examples

Examples

iex> client = Meilisearch.Client.new(endpoint: "http://localhost:7700", key: "master_key_test")
iex> Meilisearch.Settings.SearchableAttributes.reset(client, "movies")
{:ok, %{
  taskUid: 0,
  indexUid: "movies",
  status: :enqueued,
  type: :settingsUpdate,
  enqueuedAt: ~U[2021-08-12 10:00:00]
}}
Link to this function

update(client, index_uid, params)

View Source
@spec update(Tesla.Client.t(), String.t(), [String.t()]) ::
  {:ok, Meilisearch.SummarizedTask.t()} | {:error, Meilisearch.Client.error()}

Update searchable attributes settings of an Index of your Meilsiearch instance. meili doc

examples

Examples

iex> client = Meilisearch.Client.new(endpoint: "http://localhost:7700", key: "master_key_test")
iex> Meilisearch.Settings.SearchableAttributes.update(client, "movies", ["title", "overview", "genres"])
{:ok, %{
  taskUid: 0,
  indexUid: "movies",
  status: :enqueued,
  type: :settingsUpdate,
  enqueuedAt: ~U[2021-08-12 10:00:00]
}}