How to create a one-way synonym in Typesense?
Outline: [Article Title]
Keyword: [Enter Targeted Keyword]
Keyword MSV: [Enter Targeted Keyword’s Monthly Search Volume]
Author: [Enter Author Name]
Due Date: [Enter Due Date]
Publish Date: [Enter Desired Publish Date]
User Persona: [Enter Targeted Reader and/or User Persona]
When the words linux, mac and windows are defined as one-way synonyms for operating systems, searches for operating systems will return documents containing either linux,mac , windows or all of them.
Setting up a One-way synonym
To get started with the one-way synonym feature, follow the steps below. It is also available in a variety of programming languages.
For Javascript
synonym = {
root: "operating systems",
synonyms: ["linux", "windows", "mac"],
};
// Creates/updates a synonym called `operating-systems-synonyms` in the `computers` collection
client
.collections("computers")
.synonyms()
.upsert("operating-systems-synonyms", synonym);