Skip to content

Commit

Permalink
add field and remove method
Browse files Browse the repository at this point in the history
  • Loading branch information
charmingduchess committed Dec 10, 2024
1 parent a53bfbb commit c3d0b33
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion lib/elasticsearch/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
14 changes: 0 additions & 14 deletions lib/elasticsearch/elastic-query-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c3d0b33

Please sign in to comment.