From c3d0b33e4fe70e40beadf9cf71e3857181d34b34 Mon Sep 17 00:00:00 2001 From: Vera Kahn Date: Tue, 10 Dec 2024 13:33:52 -0500 Subject: [PATCH] add field and remove method --- lib/elasticsearch/config.js | 2 +- lib/elasticsearch/elastic-query-builder.js | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/elasticsearch/config.js b/lib/elasticsearch/config.js index 84314ac..41b48a5 100644 --- a/lib/elasticsearch/config.js +++ b/lib/elasticsearch/config.js @@ -84,7 +84,7 @@ const FILTER_CONFIG = { mediaType: { operator: 'match', field: ['mediaType.id', 'mediaType.label'], repeatable: true }, carrierType: { operator: 'match', field: ['carrierType.id', 'carrierType.label'], repeatable: true }, publisher: { operator: 'match', field: ['publisherLiteral.raw'], repeatable: true }, - contributorLiteral: { operator: 'match', field: ['contributorLiteral.raw'], repeatable: true }, + contributorLiteral: { operator: 'match', field: ['contributorLiteral.raw', 'parallelContributor.raw'], repeatable: true }, creatorLiteral: { operator: 'match', field: ['creatorLiteral.raw', 'parallelCreatorLiteral.raw'], repeatable: true }, issuance: { operator: 'match', field: ['issuance.id', 'issuance.label'], repeatable: true }, createdYear: { operator: 'match', field: ['createdYear'], repeatable: true }, diff --git a/lib/elasticsearch/elastic-query-builder.js b/lib/elasticsearch/elastic-query-builder.js index e1788a4..8461511 100644 --- a/lib/elasticsearch/elastic-query-builder.js +++ b/lib/elasticsearch/elastic-query-builder.js @@ -488,20 +488,6 @@ class ElasticQueryBuilder { } } - buildPackedFieldClause (value, field) { - // Figure out the base property (e.g. 'owner') - const baseField = field.replace(/_packed$/, '') - // Allow supplied val to match against either id or value: - return { - bool: { - should: [ - { term: { [`${baseField}.id`]: value } }, - { term: { [`${baseField}.label`]: value } } - ] - } - } - } - buildMultiFieldClause (value, fields) { return { bool: