mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Tokenizers - improve algorithm around exact matches.
Summary: Fixes T6102. Gets the from D10867 running in the tokenizer. This thing is pretty copy / pastey, but I guess that's okay? Test Plan: looked at a project //tokenizer// and typed "project". since I have a million things with the word "project" in it, I was delighted to see the "project" project first in this project tokenizer. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6102 Differential Revision: https://secure.phabricator.com/D11305
This commit is contained in:
parent
9b21274138
commit
49ee09be3f
2 changed files with 24 additions and 17 deletions
|
@ -8,7 +8,7 @@
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => '8fc8031a',
|
'core.pkg.css' => '8fc8031a',
|
||||||
'core.pkg.js' => 'd49bf8b2',
|
'core.pkg.js' => '61af8961',
|
||||||
'darkconsole.pkg.js' => '8ab24e01',
|
'darkconsole.pkg.js' => '8ab24e01',
|
||||||
'differential.pkg.css' => '8af45893',
|
'differential.pkg.css' => '8af45893',
|
||||||
'differential.pkg.js' => 'dad3622f',
|
'differential.pkg.js' => 'dad3622f',
|
||||||
|
@ -440,7 +440,7 @@ return array(
|
||||||
'rsrc/js/core/KeyboardShortcutManager.js' => 'ad7a69ca',
|
'rsrc/js/core/KeyboardShortcutManager.js' => 'ad7a69ca',
|
||||||
'rsrc/js/core/MultirowRowManager.js' => 'b5d57730',
|
'rsrc/js/core/MultirowRowManager.js' => 'b5d57730',
|
||||||
'rsrc/js/core/Notification.js' => '0c6946e7',
|
'rsrc/js/core/Notification.js' => '0c6946e7',
|
||||||
'rsrc/js/core/Prefab.js' => 'bbae734c',
|
'rsrc/js/core/Prefab.js' => '72da38cc',
|
||||||
'rsrc/js/core/ShapedRequest.js' => '7cbe244b',
|
'rsrc/js/core/ShapedRequest.js' => '7cbe244b',
|
||||||
'rsrc/js/core/TextAreaUtils.js' => '5c93c52c',
|
'rsrc/js/core/TextAreaUtils.js' => '5c93c52c',
|
||||||
'rsrc/js/core/Title.js' => '5c1c758c',
|
'rsrc/js/core/Title.js' => '5c1c758c',
|
||||||
|
@ -727,7 +727,7 @@ return array(
|
||||||
'phabricator-notification-menu-css' => '6aa0a74b',
|
'phabricator-notification-menu-css' => '6aa0a74b',
|
||||||
'phabricator-object-selector-css' => '029a133d',
|
'phabricator-object-selector-css' => '029a133d',
|
||||||
'phabricator-phtize' => 'd254d646',
|
'phabricator-phtize' => 'd254d646',
|
||||||
'phabricator-prefab' => 'bbae734c',
|
'phabricator-prefab' => '72da38cc',
|
||||||
'phabricator-profile-css' => '28f433ef',
|
'phabricator-profile-css' => '28f433ef',
|
||||||
'phabricator-remarkup-css' => '7604f12e',
|
'phabricator-remarkup-css' => '7604f12e',
|
||||||
'phabricator-search-results-css' => 'f240504c',
|
'phabricator-search-results-css' => 'f240504c',
|
||||||
|
@ -1276,6 +1276,18 @@ return array(
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
'phabricator-prefab',
|
'phabricator-prefab',
|
||||||
),
|
),
|
||||||
|
'72da38cc' => array(
|
||||||
|
'javelin-install',
|
||||||
|
'javelin-util',
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-typeahead',
|
||||||
|
'javelin-tokenizer',
|
||||||
|
'javelin-typeahead-preloaded-source',
|
||||||
|
'javelin-typeahead-ondemand-source',
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-util',
|
||||||
|
),
|
||||||
'7319e029' => array(
|
'7319e029' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
@ -1607,18 +1619,6 @@ return array(
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
),
|
),
|
||||||
'bbae734c' => array(
|
|
||||||
'javelin-install',
|
|
||||||
'javelin-util',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-typeahead',
|
|
||||||
'javelin-tokenizer',
|
|
||||||
'javelin-typeahead-preloaded-source',
|
|
||||||
'javelin-typeahead-ondemand-source',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-util',
|
|
||||||
),
|
|
||||||
'bd4c8dca' => array(
|
'bd4c8dca' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
|
|
|
@ -87,6 +87,13 @@ JX.install('Prefab', {
|
||||||
|
|
||||||
for (var ii = 0; ii < list.length; ii++) {
|
for (var ii = 0; ii < list.length; ii++) {
|
||||||
var item = list[ii];
|
var item = list[ii];
|
||||||
|
|
||||||
|
for (var jj = 0; jj < tokens.length; jj++) {
|
||||||
|
if (item.name.indexOf(tokens[jj]) === 0) {
|
||||||
|
priority_hits[item.id] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!item.priority) {
|
if (!item.priority) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -95,8 +102,8 @@ JX.install('Prefab', {
|
||||||
self_hits[item.id] = true;
|
self_hits[item.id] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var jj = 0; jj < tokens.length; jj++) {
|
for (var hh = 0; hh < tokens.length; hh++) {
|
||||||
if (item.priority.substr(0, tokens[jj].length) == tokens[jj]) {
|
if (item.priority.substr(0, tokens[hh].length) == tokens[hh]) {
|
||||||
priority_hits[item.id] = true;
|
priority_hits[item.id] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue