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

see documentation

Link to this section Summary

Functions

Get typo tolerance settings of an Index of your Meilisearch instance. Meilisearch documentation

Reset typo tolerance settings of an Index of your Meilisearch instance. Meilisearch documentation

Update typo tolerance settings of an Index of your Meilisearch instance. Meilisearch documentation

Link to this section Types

@type t() :: %Meilisearch.Settings.TypeTolerance{
  disableOnAttributes: [String.t()],
  disableOnWords: [String.t()],
  enabled: boolean(),
  minWordSizeForTypos:
    Meilisearch.Settings.TypeTolerance.MinWordSizesForTypos.t()
}

Link to this section Functions

Link to this function

changeset(mod \\ %__MODULE__{}, data)

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

Get typo tolerance 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.TypoTolerance.get(client, "movies")
{:ok, %Meilisearch.Settings.TypoTolerance{
  enabled: true,
  disableOnWords: [],
  disableOnAttributes: [],
  minWordSizeForTypos: %Meilisearch.Settings.TypoTolerance.MinWordSizesForTypos{
    oneTypo: 5,
    twoTypos: 9
  }
}}
Link to this function

reset(client, index_uid)

View Source

Reset typo tolerance 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.TypoTolerance.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(), %{
  enabled: boolean(),
  disableOnWords: [String.t()],
  disableOnAttributes: [String.t()],
  minWordSizeForTypos: %{oneTypo: integer(), twoTypos: integer()}
}) ::
  {:ok, Meilisearch.SummarizedTask.t()} | {:error, Meilisearch.Client.error()}

Update typo tolerance 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.TypoTolerance.update(client, "movies", %{maxTotalHits: 100})
{:ok, %{
  taskUid: 0,
  indexUid: "movies",
  status: :enqueued,
  type: :settingsUpdate,
  enqueuedAt: ~U[2021-08-12 10:00:00]
}}