OpenApiTypesense.Synonyms (OpenApiTypesense v0.6.5)
View SourceProvides API endpoints related to synonyms
Summary
Functions
Delete a synonym associated with a collection
Either one of
Retrieve a single search synonym
Either one of
List all collection synonyms
Either one of
Either one of
Create or update a synonym
Functions
@spec delete_search_synonym(String.t(), String.t()) :: {:ok, OpenApiTypesense.SearchSynonymDeleteResponse.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Delete a synonym associated with a collection
@spec delete_search_synonym( map() | OpenApiTypesense.Connection.t() | String.t(), String.t(), String.t() | keyword() ) :: {:ok, OpenApiTypesense.SearchSynonymDeleteResponse.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
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)
@spec delete_search_synonym( map() | OpenApiTypesense.Connection.t() | String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenApiTypesense.SearchSynonymDeleteResponse.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Either one of:
delete_search_synonym(%{api_key: xyz, host: ...}, collectionName, synonymId, opts)
delete_search_synonym(Connection.new(), collectionName, synonymId, opts)
@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.
@spec get_search_synonym( map() | OpenApiTypesense.Connection.t() | String.t(), String.t(), String.t() | keyword() ) :: {:ok, OpenApiTypesense.SearchSynonym.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
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)
@spec get_search_synonym( map() | OpenApiTypesense.Connection.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenApiTypesense.SearchSynonym.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Either one of:
get_search_synonym(%{api_key: xyz, host: ...}, collectionName, synonymId, opts)
get_search_synonym(Connection.new(), collectionName, synonymId, opts)
@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.
Either one of:
get_search_synonyms(collectionName, opts)
get_search_synonyms(%{api_key: xyz, host: ...}, collectionName)
get_search_synonyms(Connection.new(), collectionName)
@spec get_search_synonyms( map() | OpenApiTypesense.Connection.t(), String.t(), keyword() ) :: {:ok, OpenApiTypesense.SearchSynonymsResponse.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
@spec get_search_synonyms( map() | OpenApiTypesense.Connection.t(), String.t(), keyword() ) :: {:ok, OpenApiTypesense.SearchSynonymsResponse.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Either one of:
get_search_synonyms(%{api_key: xyz, host: ...}, collectionName, opts)
get_search_synonyms(Connection.new(), collectionName, opts)
Create or update a synonym
Create or update a synonym to define search terms that should be considered equivalent.
@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)
@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)