Skip to content

Commit

Permalink
Add byte data to metadata summary page for its children thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
wangf1122 committed Jan 20, 2025
1 parent f4890d5 commit ef65c33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public class EsSearchManager implements ISearchManager {
FIELDLIST_RELATED_SCRIPTED = ImmutableMap.<String, String>builder()
// Elasticsearch scripted field to get the first overview url. Scripted fields must return single values.
.put("overview", "return params['_source'].overview == null ? [] : params['_source'].overview.stream().map(f -> f.url).findFirst().orElse('');")
.put("overview_data", "return params['_source'].overview == null ? [] : params['_source'].overview.stream().map(f -> f.data).findFirst().orElse('');")
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,8 @@
if (md.overview && md.overview.length > 0) {
return md.overview[0].url;
// Related records contain the first overview in the properties.overview property
} else if (md.properties && md.properties.overview_data) {
return md.properties.overview_data;
} else if (md.properties && md.properties.overview) {
return md.properties.overview;
}
Expand Down

0 comments on commit ef65c33

Please sign in to comment.