From bdb3d0847be69881a58361dad22f19a801ee63dd Mon Sep 17 00:00:00 2001 From: kwahlin Date: Thu, 28 Nov 2024 17:51:34 +0100 Subject: [PATCH] Bugfix: Don't let subpaths block full paths from being added as boost field --- .../src/main/groovy/whelk/search/ESQueryLensBoost.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whelk-core/src/main/groovy/whelk/search/ESQueryLensBoost.groovy b/whelk-core/src/main/groovy/whelk/search/ESQueryLensBoost.groovy index 6806df2691..5eda13f6a8 100644 --- a/whelk-core/src/main/groovy/whelk/search/ESQueryLensBoost.groovy +++ b/whelk-core/src/main/groovy/whelk/search/ESQueryLensBoost.groovy @@ -122,9 +122,10 @@ class ESQueryLensBoost { def obj = [(JsonLd.TYPE_KEY): rangeKey] def rangeChipLens = jsonld.getLensFor(obj, chipsLenses) def rangeChipFields = collectBoostFields( - rangeChipLens, CARD_BOOST, seenKeys) + rangeChipLens, CARD_BOOST, [] as Set) return rangeChipFields.collect { "${key}.$it" as String } + .findAll {!seenKeys.contains(it) } } else { key = "${key}.${JsonLd.SEARCH_KEY}" }