Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #8024

Category None
Changed by Mike Rylander <mrylanderohnoyoudont@gmail.com>
Changed at Fri 27 Aug 2021 14:40:27
Repository git://git.evergreen-ils.org/Evergreen.git
Project Evergreen
Branch master
Revision a67ad7f9a2419301e16d79a078a4a41dcf36d788


LP#1931162: DYM needs some situational optimization
For some data sets and some queries the Did You Mean search suggestion
logic can be much too slow. This is mainly in cases where a "misspelled"
word of sufficient length greater than the symspell prefix length is
checked against many short prefixes that have many long suggestions
attached to them.

This commit optimizes for that case in particular by testing the length
of suggestions and prefix keys against the user input to avoid
unnecessary tests.  Futher, it captures the edit distance of suggestions
that pass that test in-line, avoiding expensive retesting, and caches
the short-cutoff edit distance when in low-verbosity mode to avoid
future different-but-not-too-different suggestions coming from the same
prefix key.

It additionally provides a general optimization by batching the capture
of suggest counts to avoid per-suggestion secondary lookups, and a
micro-optimization of ordering suggestions by length at distance cache

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Shula Link <slink@gchrl.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>

Changed files