OpenApiTypesense.Stopwords (OpenApiTypesense v0.6.5)

View Source

Provides API endpoints related to stopwords

Summary

Types

delete_stopwords_set_200_json_resp()

@type delete_stopwords_set_200_json_resp() :: %{id: String.t()}

Functions

delete_stopwords_set(setId)

@spec delete_stopwords_set(String.t()) ::
  {:ok, map()} | {:error, OpenApiTypesense.ApiResponse.t()}

Delete a stopwords set.

Permanently deletes a stopwords set, given it's name.

delete_stopwords_set(setId, opts)

@spec delete_stopwords_set(
  map() | OpenApiTypesense.Connection.t() | String.t(),
  String.t() | keyword()
) ::
  {:ok, map()} | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • delete_stopwords_set(setId, opts)
  • delete_stopwords_set(%{api_key: xyz, host: ...}, setId)
  • delete_stopwords_set(Connection.new(), setId)

delete_stopwords_set(conn, setId, opts)

@spec delete_stopwords_set(
  map() | OpenApiTypesense.Connection.t(),
  String.t(),
  keyword()
) ::
  {:ok, map()} | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • delete_stopwords_set(%{api_key: xyz, host: ...}, setId, opts)
  • delete_stopwords_set(Connection.new(), setId, opts)

retrieve_stopwords_set(setId)

@spec retrieve_stopwords_set(String.t()) ::
  {:ok, OpenApiTypesense.StopwordsSetRetrieveSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Retrieves a stopwords set.

Retrieve the details of a stopwords set, given it's name.

retrieve_stopwords_set(setId, opts)

Either one of:

  • retrieve_stopwords_set(setId, opts)
  • retrieve_stopwords_set(%{api_key: xyz, host: ...}, setId)
  • retrieve_stopwords_set(Connection.new(), setId)

retrieve_stopwords_set(conn, setId, opts)

Either one of:

  • retrieve_stopwords_set(%{api_key: xyz, host: ...}, setId, conn, opts)
  • retrieve_stopwords_set(Connection.new(), setId, conn, opts)

retrieve_stopwords_sets()

@spec retrieve_stopwords_sets() ::
  {:ok, OpenApiTypesense.StopwordsSetsRetrieveAllSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Retrieves all stopwords sets.

Retrieve the details of all stopwords sets

retrieve_stopwords_sets(opts)

Either one of:

  • retrieve_stopwords_sets(opts)
  • retrieve_stopwords_sets(%{api_key: xyz, host: ...})
  • retrieve_stopwords_sets(Connection.new())

retrieve_stopwords_sets(conn, opts)

Either one of:

  • retrieve_stopwords_sets(%{api_key: xyz, host: ...}, opts)
  • retrieve_stopwords_sets(Connection.new(), opts)

upsert_stopwords_set(setId, body)

@spec upsert_stopwords_set(String.t(), map()) ::
  {:ok, OpenApiTypesense.StopwordsSetSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Upserts a stopwords set.

When an analytics rule is created, we give it a name and describe the type, the source collections and the destination collection.

upsert_stopwords_set(setId, body, opts)

@spec upsert_stopwords_set(
  map() | OpenApiTypesense.Connection.t() | String.t(),
  String.t() | map(),
  map() | keyword()
) ::
  {:ok, OpenApiTypesense.StopwordsSetSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • upsert_stopwords_set(setId, body, opts)
  • upsert_stopwords_set(%{api_key: xyz, host: ...}, setId, body)
  • upsert_stopwords_set(Connection.new(), setId, body)

upsert_stopwords_set(conn, setId, body, opts)

@spec upsert_stopwords_set(
  map() | OpenApiTypesense.Connection.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, OpenApiTypesense.StopwordsSetSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • upsert_stopwords_set(%{api_key: xyz, host: ...}, setId, body, opts)
  • upsert_stopwords_set(Connection.new(), setId, body, opts)