searching-by-properties-fix 14744-inappropriate-results
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Mon, 21 Jan 2019 15:18:47 +0000 (16:18 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Mon, 21 Jan 2019 15:18:47 +0000 (16:18 +0100)
Feature #14744

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/store/search-bar/search-bar-actions.ts

index 741fac955c97f43239b49cbcc9c02d3fd97c854c..05b6f050b99b3ebfee6bf95e975ab364bbc68432 100644 (file)
@@ -480,14 +480,15 @@ export const getFilters = (filterName: string, searchValue: string, sq: ParseSea
         const props = getSearchQueryProperties(sq);
         props.forEach(p => {
             if (p.value) {
-                filter.addILike(`properties.${p.key}`, p.value);
+                filter.addILike(`properties.${p.key}`, p.value, GroupContentsResourcePrefix.PROJECT)
+                    .addILike(`properties.${p.key}`, p.value, GroupContentsResourcePrefix.COLLECTION);
             }
             filter.addExists(p.key);
         });
     }
 
-    return filter        
-    .addIsA("uuid", buildUuidFilter(resourceKind))
+    return filter
+        .addIsA("uuid", buildUuidFilter(resourceKind))
         .getFilters();
 };