Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grandexchange fuzzy: handle mid-term matches better
partial regression introduced by runelite#16973 Searches that did not share a prefix string with the item name, such as searching "splinters" for "Sunfire splinters", was not returning expected results, as the heavy bias toward shared prefixes was penalizing the query for not matching "Sunfire". This is unexpected, and the fuzzy search scorer should handle searches that do not begin at the start of the item name as well. This PR replaces the prefix bias with a longest-common-subsequence bias, to better handle those mid-string terms. It uses the maximum LCS between any pair of search words and item words, and then still defers to jaro-winkler for close-scoring tiebreakers. This still maintains some of the preferred behaviours of the original change (runelite#16973) such as prioritizing short-named items like "Pot" and "Egg" more appropriately. Those still appear as the first search result when searching their names.
- Loading branch information