Multi-word synonyms
In case of a multi-word synonym, the engine only matches the synonym when the last word starts to match. For example, if you have a one-way synonym “New York = NY”, you may not want to retrieve results with “NY” when you type “ne”. However, you do when you type “new yo”.
The engine also considers multi-word synonyms as a phrase and just return records that exactly matches the multi-word synonyms. That said, if you have a synonym "NY = New York", a query "NY" can find a result "New York Times". However, it cannot find a result "new company in York" because it doesn't contain a phrase "New York".
In other words, for multiple words, if each of those words are in a record (i.e, one attribute contains "New" and another attribute contains "York"), these records will NOT be returned.
Exact ranking criterion
By default, multi-word synonyms score lower than their original words on the exact ranking criterion. Because of this, you might get different results if you search for both the synonyms and the original. For example, if you have the multi-word synonym “distant learning = remote learning”, searching both terms can yield different results because “remote learning” scores lower on the exact
criterion. To ensure both synonyms score the same on the exact
ranking criterion, change the alternativesAsExact setting to include multiWordsSynonym
.
Typos in synonyms
We don’t allow typos on synonyms to avoid corner cases. For example, if you set a synonym to handle different ways of writing “four” (e.g., “4” or “IV”) and you allow to match synonyms with typo, the query “for” or “tour” will also match records with “IV” and “4”.
When you type “tour”, it’s understandable to see “four” highlighted because of typo-tolerance, but “IV” or “4” aren’t relevant for this query.
If you want to match on alternative names for a record, you can use a list: For example, you could change this record:
1 2 3 |
{ "title": "Computer science area" } |
To this record:
1 2 3 4 5 6 |
{ "title": [ "Computer science area", "Computer science field" ] } |