View Source Meilisearch.Settings.Pagination (meilisearch_ex v1.1.2)
see documentation
Link to this section Summary
Functions
Get pagination settings of an Index of your Meilisearch instance. Meilisearch documentation
Reset pagination settings of an Index of your Meilisearch instance. Meilisearch documentation
Update pagination settings of an Index of your Meilisearch instance. Meilisearch documentation
Link to this section Types
@type t() :: %Meilisearch.Settings.Pagination{maxTotalHits: integer()}
Link to this section Functions
@spec get(Tesla.Client.t(), String.t()) :: {:ok, t()} | {:error, Meilisearch.Client.error()}
Get pagination 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.Pagination.get(client, "movies")
{:ok, %Meilisearch.Settings.Pagination{maxTotalHits: 1000}}
@spec reset(Tesla.Client.t(), String.t()) :: {:ok, Meilisearch.SummarizedTask.t()} | {:error, Meilisearch.Client.error()}
Reset pagination 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.Pagination.reset(client, "movies")
{:ok, %{
taskUid: 0,
indexUid: "movies",
status: :enqueued,
type: :settingsUpdate,
enqueuedAt: ~U[2021-08-12 10:00:00]
}}
@spec update(Tesla.Client.t(), String.t(), %{maxTotalHits: integer()}) :: {:ok, Meilisearch.SummarizedTask.t()} | {:error, Meilisearch.Client.error()}
Update pagination 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.Pagination.update(client, "movies", %{maxTotalHits: 100})
{:ok, %{
taskUid: 0,
indexUid: "movies",
status: :enqueued,
type: :settingsUpdate,
enqueuedAt: ~U[2021-08-12 10:00:00]
}}