Negates the "score", best match has lowest score. This allows us to sort with the first results being the best matches, but preserves the Google Maps ordering for same score responses.
Cleans up the logic a bit to remove dupes at the end. The new sorting requires computing all scores, so this deduping at the end doesnt lead to useless processing.
When computing score, take into account the ordering of the words.
This significantly improves the results from my testing.
Negates the "score", best match has lowest score. This allows us to sort with the first results being the best matches, but preserves the Google Maps ordering for same score responses. Cleans up the logic a bit to remove dupes at the end. The new sorting requires computing all scores, so this deduping at the end doesnt lead to useless processing. When computing score, take into account the ordering of the words. This significantly improves the results from my testing.