implement journal title search
authorBill Erickson <berickxx@gmail.com>
Wed, 18 Sep 2019 19:25:32 +0000 (15:25 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 27 Oct 2021 15:50:12 +0000 (11:50 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/catalog/elastic.service.ts

index ae81d97..03fc0b6 100644 (file)
@@ -239,7 +239,15 @@ export class ElasticService {
         if (value === '' || value === null) { return; }
 
         const matchOp = ts.matchOp[idx];
-        const fieldClass = ts.fieldClass[idx];
+        let fieldClass = ts.fieldClass[idx];
+
+        if (fieldClass === 'jtitle') {
+            // Presented as a search class, but it's really a special
+            // title search.
+            fieldClass = 'title';
+            ts.ccvmFilters.bib_level.push('s');
+        }
+
         const textIndex = `${fieldClass}.text*`;
         let query;