JamieAppleseed/selectToAutocomplete — Issue #11: data-relevancy-booster on United Kingdom
Author: jonathanheron
Created: 2011-11-15 20:47:20+00:00
State: open

### Test case 1

* Use index.html demo in commit 92e494e819
* Type in 'ire'

**(My) expected behaviour:** 'Ireland' should be first in the list as 'ire' is an exact match for the beginning of the country name.

**Actual behaviour:** 'United Kingdom' is first in the list, despite the weaker matching. The 'data-alternative-spellings' attribute for United Kingdom includes 'Ireland'.

---

### Test case 2

* Use index.html demo in commit 92e494e819
* Type in 'ireland'

**(My) expected behaviour:** 'Ireland' should be first in the list as it is an exact match for the entered phrase.

**Actual behaviour:** 'United Kingdom' is first in the list, despite the weaker matching. The 'data-alternative-spellings' attribute for United Kingdom includes 'Ireland'.

---

### Thoughts

In test case 1, it is debatable whether the issue is one of the data-relevancy-booster is set too high (2.5). When data-relevancy-booster is set to 1.2 or lower, "Ireland" will be the first match.

In test case 2, however, the exact match for the default name should surely (IMHO) outweigh the data-relevancy-boost applied to United Kingdom.

There's a middle ground between test cases 1 and 2, wherein it is difficult to determine where matching against the primary name should outweigh the data-relevancy-booster.