Metarecord constituants search uses ES
authorBill Erickson <berickxx@gmail.com>
Thu, 10 Oct 2019 20:52:39 +0000 (16:52 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 13 Jun 2022 20:01:55 +0000 (16:01 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/catalog/elastic.service.ts

index 22cbe7c..23f3887 100644 (file)
@@ -25,7 +25,6 @@ export class ElasticService {
         if (ctx.marcSearch.isSearchable()) { return true; }
 
         if ( ctx.termSearch.isSearchable() &&
-            !ctx.termSearch.fromMetarecord &&
             !ctx.termSearch.hasBrowseEntry) {
             return true;
         }
@@ -163,6 +162,10 @@ export class ElasticService {
                 rootNode.filter(range);
             }
         }
+
+        if (ts.fromMetarecord) {
+            rootNode.filter(new TermQuery('metarecord', ts.fromMetarecord));
+        }
     }