aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services/indexsearch.ts
diff options
context:
space:
mode:
authorOzoneGrif2020-02-27 18:36:06 +0100
committerGitHub2020-02-27 18:36:06 +0100
commit5c88a08ee28ea37054144c336b14e55ab957f844 (patch)
treeeec84231d3c4fbe470e93b98333238f212ba7b27 /viewer/src/services/indexsearch.ts
parent3e27a3cfa35359f6ffa83843aa2f2ad53f42f1d4 (diff)
parent4641f35baebd618ec51fa549adf64670c31c647f (diff)
downloadldgallery-5c88a08ee28ea37054144c336b14e55ab957f844.tar.gz
Merge pull request #163 from pacien/oz-result-count-in-other-folders
viewer: added a count of results found in other folders when no-resul…
Diffstat (limited to 'viewer/src/services/indexsearch.ts')
-rw-r--r--viewer/src/services/indexsearch.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/viewer/src/services/indexsearch.ts b/viewer/src/services/indexsearch.ts
index 3e73fb1..cd3383a 100644
--- a/viewer/src/services/indexsearch.ts
+++ b/viewer/src/services/indexsearch.ts
@@ -22,12 +22,11 @@ import { Operation } from '@/@types/Operation';
22export default class IndexSearch { 22export default class IndexSearch {
23 23
24 // Results of the search (by tags) 24 // Results of the search (by tags)
25 public static search(searchTags: Tag.Search[], rootPath: string): Gallery.Item[] { 25 public static search(searchTags: Tag.Search[]): Gallery.Item[] {
26 const byOperation = this.extractTagsByOperation(searchTags); 26 const byOperation = this.extractTagsByOperation(searchTags);
27 const intersection = this.extractIntersection(byOperation); 27 const intersection = this.extractIntersection(byOperation);
28 const substraction = this.extractSubstraction(byOperation); 28 const substraction = this.extractSubstraction(byOperation);
29 return this.aggregateAll(byOperation, intersection, substraction) 29 return this.aggregateAll(byOperation, intersection, substraction);
30 .filter(item => item.path.startsWith(rootPath));
31 } 30 }
32 31
33 private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation { 32 private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation {