If you’re unable to import synonyms with a CSV file, the first thing to check is that the file contains one set of comma-separated synonyms per line. The CSV import expects each row to represent a single synonym set.
If you see the error Failed to upload array must contain at least two elements (in [0]), it usually means the CSV format is invalid. This can happen when a row is wrapped in quotes incorrectly or when a row contains only one term instead of a synonym set.
Before importing you CSV file, make sure to check the following:
- Remove any empty rows from the file
- Make sure each line contains a valid synonym set
- Don’t wrap each full line in quotation marks
- Don’t include a line with only a single word
- The number of terms in each synonym entry - a regular synonym set can contain up to 20 words, while a one-way synonym can contain up to 100 words or phrases. Exceeding these limits can cause the error
Failed to upload too many synonyms in n-way synonym.
For a full list of common synonym issues, troubleshooting topics and best practices, see our summary article here.