Typesense synonyms library?

Hudu team, big thank you for adding this integration.

Could we please setup a common library of synonyms and I'll start with suggesting some myself:

#!/usr/bin/env bash
set -euo pipefail

: "${TYPESENSE_API_KEY:?Please export TYPESENSE_API_KEY}"

TYPESENSE_HOST="${TYPESENSE_HOST:-http://localhost:8108}"
COLLECTION="${COLLECTION:-articles}"

put_syn() {
  local id="$1"; shift
  local arr="["
  local first=1
  for term in "$@"; do
    # basic escaping for JSON string values
    local t="${term//\\/\\\\}"
    t="${t//\"/\\\"}"
    if [ $first -eq 1 ]; then
      first=0
    else
      arr+=","
    fi
    arr+="\"$t\""
  done
  arr+="]"

  curl -sS -X PUT \
    "$TYPESENSE_HOST/collections/$COLLECTION/synonyms/$id" \
    -H "X-TYPESENSE-API-KEY: $TYPESENSE_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"synonyms\":$arr}"
  echo
}

# -----------------------------
# Microsoft (18)
# -----------------------------
put_syn microsoft_m365_core \
  "Microsoft 365" "M365" "Office 365" "O365" "MS 365" "Office365"

put_syn microsoft_entra_id \
  "Entra ID" "Microsoft Entra ID" "Azure AD" "AAD" "MS Entra"

put_syn microsoft_intune \
  "Microsoft Intune" "Intune" "Microsoft Endpoint Manager" "MEM" "Endpoint Manager"

put_syn microsoft_exchange_online \
  "Exchange Online" "EXO" "Microsoft Exchange Online"

put_syn microsoft_sharepoint_online \
  "SharePoint Online" "SPO" "Microsoft SharePoint Online" "SharePoint"

put_syn microsoft_onedrive_business \
  "OneDrive for Business" "ODfB" "OneDrive" "Microsoft OneDrive"

put_syn microsoft_teams_core \
  "Microsoft Teams" "Teams" "MS Teams" "MSTeams"

put_syn microsoft_teams_phone \
  "Teams Phone" "Microsoft Teams Phone" "Phone System" "Microsoft Phone System" "Cloud PBX"

put_syn microsoft_outlook_web \
  "Outlook on the Web" "OWA" "Outlook Web Access" "Outlook Web App"

put_syn microsoft_new_outlook \
  "New Outlook" "One Outlook" "Outlook for Windows (new)" "Project Monarch"

put_syn microsoft_windows_autopilot \
  "Windows Autopilot" "Autopilot" "Microsoft Autopilot"

put_syn microsoft_conditional_access \
  "Conditional Access" "CA" "Azure AD Conditional Access" "Entra Conditional Access"

put_syn microsoft_defender_endpoint \
  "Microsoft Defender for Endpoint" "MDE" "Defender ATP" "Windows Defender ATP"

put_syn microsoft_defender_office365 \
  "Microsoft Defender for Office 365" "MDO" "Office 365 ATP" "O365 ATP"

put_syn microsoft_defender_identity \
  "Microsoft Defender for Identity" "MDI" "Azure ATP" "AATP"

put_syn microsoft_entra_connect \
  "Entra Connect" "Azure AD Connect" "AAD Connect" "Entra Connect Sync"

put_syn microsoft_whfb \
  "Windows Hello for Business" "WHfB" "Windows Hello"

put_syn microsoft_m365_apps_enterprise \
  "Microsoft 365 Apps for enterprise" "Microsoft 365 Apps" "Office 365 ProPlus" "O365 ProPlus"

# -----------------------------
# Fortinet (8)
# -----------------------------
put_syn fortinet_fortigate \
  "FortiGate" "FGT" "FortiGate Firewall" "Fortinet NGFW"

put_syn fortinet_fortimanager \
  "FortiManager" "FMG" "Fortinet Manager"

put_syn fortinet_fortianalyzer \
  "FortiAnalyzer" "FAZ" "Fortinet Analyzer"

put_syn fortinet_fortiswitch \
  "FortiSwitch" "FSW" "Fortinet Switch"

put_syn fortinet_fortiap \
  "FortiAP" "FAP" "Fortinet Access Point"

put_syn fortinet_forticlient_ems \
  "FortiClient EMS" "EMS" "Fortinet EMS"

put_syn fortinet_fortiauthenticator \
  "FortiAuthenticator" "FAC" "Fortinet Authenticator"

put_syn fortinet_fortisase \
  "FortiSASE" "Fortinet SASE" "Fortinet Secure Access Service Edge"

# -----------------------------
# RUCKUS (5)
# -----------------------------
put_syn ruckus_one \
  "RUCKUS One" "Ruckus One" "Ruckus Cloud" "Ruckus Cloud Wi-Fi"

put_syn ruckus_smartzone \
  "SmartZone" "SZ" "Ruckus SmartZone"

put_syn ruckus_zonedirector \
  "ZoneDirector" "ZD" "Ruckus ZoneDirector"

put_syn ruckus_unleashed \
  "Ruckus Unleashed" "Unleashed" "Ruckus Unleashed Wi-Fi"

put_syn ruckus_icx \
  "Ruckus ICX" "ICX" "Ruckus Switches"

# -----------------------------
# Dell (4)
# -----------------------------
put_syn dell_poweredge \
  "Dell PowerEdge" "PowerEdge" "Dell Server"

put_syn dell_idrac \
  "iDRAC" "iDrac" "Integrated Dell Remote Access Controller"

put_syn dell_openmanage \
  "Dell OpenManage" "OpenManage" "OMSA"

put_syn dell_latitude \
  "Dell Latitude" "Latitude" "Dell Latitude Laptop"

# -----------------------------
# HPE (4)
# -----------------------------
put_syn hpe_proliant \
  "HPE ProLiant" "ProLiant" "HPE Server"

put_syn hpe_ilo \
  "HPE iLO" "iLO" "Integrated Lights-Out"

put_syn hpe_oneview \
  "HPE OneView" "OneView" "HPE One View"

put_syn hpe_nimble \
  "HPE Nimble Storage" "HPE Nimble" "Nimble Storage"

# -----------------------------
# Lenovo (3)
# -----------------------------
put_syn lenovo_thinkpad \
  "Lenovo ThinkPad" "ThinkPad" "Lenovo ThinkPad Laptop"

put_syn lenovo_thinkcentre \
  "Lenovo ThinkCentre" "ThinkCentre" "Lenovo ThinkCentre Desktop"

put_syn lenovo_xclarity \
  "Lenovo XClarity Administrator" "LXCA" "XClarity Admin"

# -----------------------------
# Druva (3)
# -----------------------------
put_syn druva_insync \
  "Druva inSync" "inSync" "Druva Microsoft 365 Backup"

put_syn druva_phoenix \
  "Druva Phoenix" "Phoenix" "Druva Server Backup"

put_syn druva_drc \
  "Druva Data Resiliency Cloud" "Druva Cloud" "Druva Platform"

# -----------------------------
# KnowBe4 (2)
# -----------------------------
put_syn knowbe4_kmsat \
  "KnowBe4 Security Awareness Training" "KMSAT" "KnowBe4 SAT" "KnowBe4"

put_syn knowbe4_phisher \
  "KnowBe4 PhishER" "PhishER" "KB4 PhishER"

# -----------------------------
# Arctic Wolf (2)
# -----------------------------
put_syn arcticwolf_mdr \
  "Arctic Wolf Managed Detection and Response" "Arctic Wolf MDR" "AWN MDR"

put_syn arcticwolf_managed_risk \
  "Arctic Wolf Managed Risk" "AWN Managed Risk" "Arctic Wolf Risk Management"

# -----------------------------
# Yealink (1)
# -----------------------------
put_syn yealink_mtr \
  "Yealink Microsoft Teams Rooms" "Yealink MTR" "Yealink Teams Rooms"

Further to this, Hudu Team , any chance of adding synonyms manager into the Admin > Integrations section?

7
4 replies