issue415: hinting: sort hints by text match position

Priority: feature Status: chatting
Messages
msg1052 (view) Author: retroj Date: 2012-08-25.18:33:16
Feature request for hints to be sorted by text match position.  Meaning
that if there are two links "hello world" and "world news" and you search
for "world", then the numbering should be 2. "hello world"; 1. "world
news".
msg1053 (view) Author: retroj Date: 2012-08-25.18:35:30
We would not want to do this by default, as the sorting will mean another
performance hit on hinting, which is already too slow on some sites, but
may provide as an option if it can be done cleanly.
msg1054 (view) Author: retroj Date: 2012-08-25.18:37:24
Looks like it could be implemented fairly straight-forwardly in
hint_manager.update_valid_hints, as a sort loop, just before the 'outer'
loop.  Sort on match position of first token in each hint's 'text'.
msg1055 (view) Author: retroj Date: 2012-08-25.18:39:01
Another idea was to prioritize matches on word boundaries over matches not
on word boundaries.  Generalized hints_text_match (ala casual-spelling)
might make this impractical.
History
Date User Action Args
2012-08-25 18:39:01retrojsetmessages: + msg1055
2012-08-25 18:37:24retrojsetmessages: + msg1054
2012-08-25 18:35:30retrojsetstatus: unread -> chatting
messages: + msg1053
2012-08-25 18:33:16retrojcreate