Synonym-based search doesn't produce the same result as replacing the synonym manually


I’m currently running into a problem where two searches that should in my mind produce the same results… don’t.

I can reproduce this in a relatively minimal example, so here are my two records:

    "objectID": 1,
    "countries": [
      "England and Wales",
      "New Zealand",
      "Northern Ireland",
      "United States",
      "United Kingdom",
      "American Samoa",
      "Antigua and Barbuda",
      "Bonaire Sint Eustatius and Saba",
      "Bosnia and Herzegovina",
      "British Virgin Islands",
      "Burkina Faso",
      "Cape Verde",
      "Cayman Islands",
      "Central African Republic",
      "Hong Kong",
      "Cook Islands",
      "Costa Rica",
      "Cote d'Ivoire",
      "North Korea",
      "Democratic Republic of Congo",
      "Dominican Republic",
      "El Salvador",
      "Equatorial Guinea",
      "Falkland Islands",
      "Faroe Islands",
      "French Guiana",
      "French Polynesia",
      "High-income countries",
      "Isle of Man",
      "Land-locked Developing Countries (LLDC)",
      "Latin America and the Caribbean",
      "Least developed countries",
      "Less developed regions",
      "Less developed regions, excluding China",
      "Less developed regions, excluding least developed countries",
      "Low-income countries",
      "Lower-middle-income countries",
      "Marshall Islands",
      "Micronesia (country)",
      "Middle-income countries",
      "More developed regions",
      "New Caledonia",
      "No income group available",
      "North Macedonia",
      "Northern America",
      "Northern Mariana Islands",
      "Papua New Guinea",
      "Puerto Rico",
      "South Korea",
      "Saint Barthelemy",
      "Saint Helena",
      "Saint Kitts and Nevis",
      "Saint Lucia",
      "Saint Martin (French part)",
      "Saint Pierre and Miquelon",
      "Saint Vincent and the Grenadines",
      "San Marino",
      "Sao Tome and Principe",
      "Saudi Arabia",
      "Sierra Leone",
      "Sint Maarten (Dutch part)",
      "Small Island Developing States (SIDS)",
      "Solomon Islands",
      "South Africa",
      "South Sudan",
      "Sri Lanka",
      "East Timor",
      "Trinidad and Tobago",
      "Turks and Caicos Islands",
      "United Arab Emirates",
      "United States Virgin Islands",
      "Upper-middle-income countries",
      "Wallis and Futuna",
      "Western Sahara",
    "objectID": 2,
    "countries": ["Australia", "United Arab Emirates"]

Otherwise, this index is set up with the synonym UAE <-> United Arab Emirates, and the only searchable attribute is unordered(countries).

Then, when searching for “UAE”, I only get back one result (objectID 2).

On the other hand, when searching for “United Arab Emirates”, I get back both of these results.

This is entirely unexpected to me; I would expect both of these queries to produce the same results. It seems that synonym-based matching stops after 100-or-so entries in a list.

Is this a known limitation? Could anyone point me in the right direction here?


Screenshots of the situation

Screenshots of the Algolia dashboard

Query “uae”

Query “united arab emirates”

If need be, this problem can be reproduced in Algolia application 74GKBOIDJQ, index name marcel-test-2.