Skip to main content

synonym_sets

Creates, updates, deletes, gets or lists a synonym_sets resource.

Overview

Namesynonym_sets
TypeResource
Idgoogle.contentwarehouse.synonym_sets

Fields

NameDatatypeDescription
namestringThe resource name of the SynonymSet This is mandatory for google.api.resource. Format: projects/{project_number}/locations/{location}/synonymSets/{context}.
contextstringThis is a freeform field. Example contexts can be "sales," "engineering," "real estate," "accounting," etc. The context can be supplied during search requests.
synonymsarrayList of Synonyms for the context.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, synonymSetsIdGets a SynonymSet for a particular context. Throws a NOT_FOUND exception if the Synonymset does not exist
listSELECTlocationsId, projectsIdReturns all SynonymSets (for all contexts) for the specified location.
createINSERTlocationsId, projectsIdCreates a SynonymSet for a single context. Throws an ALREADY_EXISTS exception if a synonymset already exists for the context.
deleteDELETElocationsId, projectsId, synonymSetsIdDeletes a SynonymSet for a given context. Throws a NOT_FOUND exception if the SynonymSet is not found.
patchUPDATElocationsId, projectsId, synonymSetsIdRemove the existing SynonymSet for the context and replaces it with a new one. Throws a NOT_FOUND exception if the SynonymSet is not found.

SELECT examples

Returns all SynonymSets (for all contexts) for the specified location.

SELECT
name,
context,
synonyms
FROM google.contentwarehouse.synonym_sets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new synonym_sets resource.

/*+ create */
INSERT INTO google.contentwarehouse.synonym_sets (
locationsId,
projectsId,
synonyms,
context,
name
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ synonyms }}',
'{{ context }}',
'{{ name }}'
;

UPDATE example

Updates a synonym_sets resource.

/*+ update */
UPDATE google.contentwarehouse.synonym_sets
SET
synonyms = '{{ synonyms }}',
context = '{{ context }}',
name = '{{ name }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND synonymSetsId = '{{ synonymSetsId }}';

DELETE example

Deletes the specified synonym_sets resource.

/*+ delete */
DELETE FROM google.contentwarehouse.synonym_sets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND synonymSetsId = '{{ synonymSetsId }}';