Typesensory.Api.Promote (Typesensory v0.1.0)

API calls for all endpoints tagged Promote.

Link to this section Summary

Functions

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.

Link to this section Functions

Link to this function

delete_search_override(connection, collection_name, override_id, opts \\ [])

@spec delete_search_override(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, Typesensory.Model.ApiResponse.t()}
  | {:ok, Typesensory.Model.SearchOverride.t()}
  | {:error, Tesla.Env.t()}

Delete an override associated with a collection

parameters

Parameters

  • connection (Typesensory.Connection): Connection to server
  • collection_name (String.t): The name of the collection
  • override_id (String.t): The ID of the search override to delete
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, Typesensory.Model.SearchOverride.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_search_overrides(connection, collection_name, opts \\ [])

@spec get_search_overrides(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Typesensory.Model.SearchOverridesResponse.t()} | {:error, Tesla.Env.t()}

List all collection overrides

parameters

Parameters

  • connection (Typesensory.Connection): Connection to server
  • collection_name (String.t): The name of the collection
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, Typesensory.Model.SearchOverridesResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

upsert_search_override(connection, collection_name, override_id, search_override_schema, opts \\ [])

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.

parameters

Parameters

  • connection (Typesensory.Connection): Connection to server
  • collection_name (String.t): The name of the collection
  • override_id (String.t): The ID of the search override to create/update
  • search_override_schema (SearchOverrideSchema): The search override object to be created/updated
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, Typesensory.Model.SearchOverride.t} on success
  • {:error, Tesla.Env.t} on failure