- CASE SENSITIVE EQUALS: Case-sensitive equality trumps all. These will be first. (ex.
France
would matchFrance
, but notfrance
) - EQUALS: Case-insensitive equality (ex.
France
would matchfrance
) - STARTS WITH: If the item starts with the given value (ex.
Sou
would matchSouth Korea
orSouth Africa
) - WORD STARTS WITH: If the item has multiple words, then if one of those words starts with the given value (ex.
Repub
would matchDominican Republic
) - CASE STARTS WITH: If the item has a defined case (
camelCase
,PascalCase
,snake_case
orkebab-case
), then if one of the parts starts with the given value (ex.kingdom
would matchunitedKingdom
orunited_kingdom
) - CASE ACRONYM If the item's case matches the synonym (ex.
uk
would matchunited-kingdom
orUnitedKingdom
) - CONTAINS: If the item contains the given word (ex.
America
would matchSouth America
) - ACRONYM: If the item's acronym is the given value (ex.
us
would matchUnited States
)
- Searching for "rica" would not bring up "America"
- The first 4 are particularly important
- Casing is not particularly important most of the time
- Different use cases may require additional algorithms. For instance, to handle aliases or unique identifiers.