OpenApiTypesense.Curation (OpenApiTypesense v0.6.5)

View Source

Provides API endpoints related to curation

Summary

Functions

delete_search_override(collectionName, overrideId)

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

Delete an override associated with a collection

delete_search_override(collectionName, overrideId, opts)

Either one of:

  • delete_search_override(collectionName, overrideId, opts)
  • delete_search_override(%{api_key: xyz, host: ...}, collectionName, overrideId)
  • delete_search_override(Connection.new(), collectionName, overrideId)

delete_search_override(conn, collectionName, overrideId, opts)

Either one of:

  • delete_search_override(%{api_key: xyz, host: ...}, collectionName, overrideId, opts)
  • delete_search_override(Connection.new(), collectionName, overrideId, opts)

get_search_overrides(collectionName)

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

List all collection overrides

Options

  • limit: Limit results in paginating on collection listing.
  • offset: Skip a certain number of results and start after that.

get_search_overrides(collectionName, opts)

Either one of:

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

get_search_overrides(conn, collectionName, opts)

Either one of:

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

upsert_search_override(collectionName, overrideId, body)

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

Create or update an override to promote certain documents over others

Create or update an override to promote certain documents over others. Using overrides, you can include or exclude specific documents for a given query.

upsert_search_override(collectionName, overrideId, body, opts)

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

Either one of:

  • upsert_search_override(collectionName, overrideId, body, opts)
  • upsert_search_override(%{api_key: xyz, host: ...}, collectionName, overrideId, body)
  • upsert_search_override(Connection.new(), collectionName, overrideId, body)

upsert_search_override(conn, collectionName, overrideId, body, opts)

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

Either one of:

  • upsert_search_override(%{api_key: xyz, host: ...}, collectionName, overrideId, body, opts)
  • upsert_search_override(Connection.new(), collectionName, overrideId, body, opts)