Actions50
- Collection Actions
- Document Actions
- Search Actions
- Analytics Actions
- API Key Actions
- Alias Actions
- Synonym Actions
- Override Actions
- Conversation Actions
Synonym → Create
AI-generatedOverview
This node operation creates a new synonym set in a specified collection within a Typesense instance. It is useful for enhancing search functionality by defining groups of words that should be treated as equivalent or related during search queries. For example, creating synonyms for product names or technical terms can improve search accuracy and user experience.
Use Case Examples
- Creating a synonym set for a collection of products where 'Microsoft 365', 'M365', and 'Office 365' are treated as synonyms to ensure search queries for any of these terms return relevant results.
- Defining one-way synonyms where a root term like 'smart phone' expands to include 'iphone' and 'android' in search results.
Properties
| Name | Meaning |
|---|---|
| Collection Name | The target collection in the Typesense instance where the synonym set will be created. This is a required selection from available collections. |
| Synonym Set Name | The unique name for the new synonym set to be created in the collection. This is a required string input. |
| JSON Input | A boolean flag indicating whether the synonym set is provided as raw JSON input. |
| Synonym Set (JSON) | The raw JSON string representing the synonym set, used only if JSON Input is true. Example formats include multi-way synonyms or one-way synonyms with a root term. |
| Synonyms | A comma-separated list of words to be treated as multi-way synonyms, used if JSON Input is false. This is a required field. |
| Additional Options | Optional parameters for the synonym set, including 'Root' for one-way synonyms, 'Locale' for tokenization and matching locale, and 'Symbols to Index' for special characters to index as-is. |
Output
JSON
id- The identifier of the created synonym set.synonyms- The list of synonyms included in the created synonym set.root- The root term for one-way synonyms, if specified.locale- The locale used for tokenization and matching, if specified.symbols_to_index- Special characters indexed as-is, if specified.
Dependencies
- Requires connection to a Typesense instance via an API key credential for authentication.
Troubleshooting
- Ensure the selected collection exists in the Typesense instance; otherwise, the node will return an error when attempting to create the synonym set.
- If JSON Input is true, the JSON string must be correctly formatted according to Typesense's synonym set schema; invalid JSON will cause errors.
- The Synonym Set Name must be unique within the collection; duplicate names will cause creation to fail.
- Special characters in 'Symbols to Index' must be comma-separated without spaces to be correctly processed.
Links
- Typesense API - Create Synonym - Official Typesense documentation for creating synonym sets via API.