OpenApiTypesense.Synonyms (OpenApiTypesense v0.6.5)

View Source

Provides API endpoints related to synonyms

Summary

Functions

delete_search_synonym(collectionName, synonymId)

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

Delete a synonym associated with a collection

delete_search_synonym(collectionName, synonymId, opts)

Either one of:

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

delete_search_synonym(conn, collectionName, synonymId, opts)

Either one of:

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

get_search_synonym(collectionName, synonymId)

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

Retrieve a single search synonym

Retrieve the details of a search synonym, given its id.

get_search_synonym(collectionName, synonymId, opts)

Either one of:

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

get_search_synonym(conn, collectionName, synonymId, opts)

Either one of:

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

get_search_synonyms(collectionName)

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

List all collection synonyms

Options

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

get_search_synonyms(collectionName, opts)

Either one of:

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

get_search_synonyms(conn, collectionName, opts)

Either one of:

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

upsert_search_synonym(collectionName, synonymId, body)

Create or update a synonym

Create or update a synonym to define search terms that should be considered equivalent.

upsert_search_synonym(collectionName, synonymId, body, opts)

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

Either one of:

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

upsert_search_synonym(conn, collectionName, synonymId, body, opts)

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

Either one of:

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