Skip to content

Commit 6e08455

Browse files
authored
Merge pull request #11172 from vera/fix-search-api-nested-metadata-fields
fix: don't duplicate nested compound fields in metadataBlocks returned by search API
2 parents f5a1a5f + 46e7e34 commit 6e08455

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deeply nested compound fields are not (yet) supported by Dataverse but the Search API now properly avoids returning duplicate values for them. See #11172.

src/main/java/edu/harvard/iq/dataverse/search/SolrSearchResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ private void json(Map<String, List<String>> metadataFieldMapNames,
750750
for (DatasetField datasetField : datasetFields) {
751751
if (metadataBlockFieldNames.contains("*")
752752
|| metadataBlockFieldNames.contains(datasetField.getDatasetFieldType().getName())) {
753-
if (datasetField.getDatasetFieldType().isCompound() || !datasetField.getDatasetFieldType().isHasParent()) {
753+
if (!datasetField.getDatasetFieldType().isHasParent()) {
754754
JsonObject item = JsonPrinter.json(datasetField);
755755
if (item != null) {
756756
fieldsArray.add(item);

0 commit comments

Comments
 (0)