nitdoc: improves quicksearch
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 16 Jan 2014 02:44:23 +0000 (21:44 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 16 Jan 2014 02:44:23 +0000 (21:44 -0500)
commitf03b9ca6254e3bdf0b90fba22136c22903f6138a
treef1775b920cf92630ceb6a8fe4d56cac7d192781a
parent9b1b560b534837821ba93a4ed1173fd87f806574
nitdoc: improves quicksearch

Basic match is made on the begining of the string:
* first we select results with startsWith(substring)
* then we apply ranking using Dice coefficient
* rank bonus is given to exact match

If there is no match found:
* we rank all the entries and sort them
* entries with a Dice coefficient = 0 are trimmed

Also made some improvements on the GUI:
* results are grouped by name
* user can scroll the results list
* better handling of arrows in the search text field

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
share/nitdoc/scripts/Nitdoc.QuickSearch.js
share/nitdoc/styles/Nitdoc.QuickSearch.css