View Source Meilisearch.Settings.Synonyms (meilisearch_ex v1.1.2)

see documentation

Link to this section Summary

Functions

Get synonyms settings of an Index of your Meilisearch instance. Meilisearch documentation

Reset synonyms settings of an Index of your Meilisearch instance. Meilisearch documentation

Update synonyms settings of an Index of your Meilisearch instance. Meilisearch documentation

Link to this section Functions

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

Get synonyms settings of an Index of your Meilisearch instance. Meilisearch documentation

examples

Examples

iex> client = Meilisearch.Client.new(endpoint: "http://localhost:7700", key: "master_key_test")
iex> Meilisearch.Settings.Synonyms.get(client, "movies")
{:ok, %{
  "wolverine" => ["xmen", "logan"],
  "logan" => ["wolverine", "xmen"],
  "wow" => ["world of warcraft"]
}}
Link to this function

reset(client, index_uid)

View Source

Reset synonyms settings of an Index of your Meilisearch instance. Meilisearch documentation

examples

Examples

iex> client = Meilisearch.Client.new(endpoint: "http://localhost:7700", key: "master_key_test")
iex> Meilisearch.Settings.Synonyms.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(), %{required(String.t()) => [String.t()]}) ::
  {:ok, Meilisearch.SummarizedTask.t()} | {:error, Meilisearch.Client.error()}

Update synonyms settings of an Index of your Meilisearch instance. Meilisearch documentation

examples

Examples

iex> client = Meilisearch.Client.new(endpoint: "http://localhost:7700", key: "master_key_test")
iex> Meilisearch.Settings.Synonyms.update(client, "movies", %{
  "wolverine" => ["xmen", "logan"],
  "logan" => ["wolverine", "xmen"],
  "wow" => ["world of warcraft"]
})
{:ok, %{
  taskUid: 0,
  indexUid: "movies",
  status: :enqueued,
  type: :settingsUpdate,
  enqueuedAt: ~U[2021-08-12 10:00:00]
}}