[Search] Moved search folder location

Moved search from platform/features/search to
platform/search. Added more style corrections.
This commit is contained in:
slhale 2015-08-03 09:38:30 -07:00
parent 164d5485e9
commit 9be646f1e7
19 changed files with 6 additions and 6 deletions

View File

@ -16,13 +16,13 @@
"platform/features/pages",
"platform/features/plot",
"platform/features/scrolling",
"platform/features/search",
"platform/features/events",
"platform/forms",
"platform/persistence/elastic",
"platform/persistence/queue",
"platform/policy",
"platform/entanglement",
"platform/search",
"example/imagery",
"example/eventGenerator",

View File

@ -1,5 +1,5 @@
{
"name": "Search View",
"name": "Search",
"description": "Allows the user to search through the file tree.",
"extensions": {
"controllers": [

View File

@ -55,7 +55,7 @@ define(
}
return searchTerm.split(' ').map(function (s) {
if (s.includes('"')) {
if (s.indexOf('"') !== -1) {
return s;
} else {
return s + '~' + editDistance;
@ -166,7 +166,7 @@ define(
}).then(function (rawResults) {
// ...then process the data
return processResults(rawResults, timestamp);
}).catch(function (err) {
})['catch'](function (err) {
// In case of error, return nothing. (To prevent
// infinite loading time.)
return {hits: [], total: 0};

View File

@ -97,7 +97,7 @@
for (i = 0; i < terms.length; i += 1) {
// Increase the score if the term is in the item name
if (name.includes(terms[i])) {
if (name.indexOf(terms[i]) !== -1) {
score += 1;
// Add extra to the score if the search term exists

View File

@ -31,7 +31,7 @@ define(
describe("The generic search worker ", function () {
// If this test fails, make sure this path is correct
var worker = new Worker('platform/features/search/src/workers/GenericSearchWorker.js'),
var worker = new Worker('platform/search/src/workers/GenericSearchWorker.js'),
numObjects = 5;
beforeEach(function () {