Skip to content

Commit bf28fa3

Browse files
committed
[DSC-1988] add followAuthorityMaxItemLimit configuration
1 parent 8bcddd2 commit bf28fa3

5 files changed

Lines changed: 21 additions & 10 deletions

File tree

config/config.example.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,6 @@ item:
327327
# The maximum number of values for repeatable metadata to show in the full item
328328
metadataLimit: 20
329329

330-
# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
331-
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests
332-
# to efficiently display the search results.
333-
followAuthorityMetadata:
334-
- type: Publication
335-
metadata: dc.contributor.author
336-
- type: Product
337-
metadata: dc.contributor.author
338-
339330
# Collection Page Config
340331
collection:
341332
edit:
@@ -517,3 +508,19 @@ addToAnyPlugin:
517508
title: DSpace CRIS 7 demo
518509
# The link to be shown in the shared post, if different from document.location.origin (optional)
519510
# link: https://dspacecris7.4science.cloud/
511+
512+
# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
513+
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests
514+
# to efficiently display the search results.
515+
followAuthorityMetadata:
516+
- type: Publication
517+
metadata: dc.contributor.author
518+
- type: Product
519+
metadata: dc.contributor.author
520+
521+
# The maximum number of item to process when following authority metadata values.
522+
followAuthorityMaxItemLimit: 100
523+
524+
# The maximum number of metadata values to process for each metadata key
525+
# when following authority metadata values.
526+
followAuthorityMetadataValuesLimit: 5

src/app/core/browse/search-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class SearchManager {
113113
})
114114
.filter((item) => hasValue(item));
115115

116-
const uuidList = this.extractUUID(items, environment.followAuthorityMetadata, 100);
116+
const uuidList = this.extractUUID(items, environment.followAuthorityMetadata, environment.followAuthorityMaxItemLimit);
117117

118118
return uuidList.length > 0 ? this.itemService.findAllById(uuidList).pipe(
119119
getFirstCompletedRemoteData(),

src/config/app-config.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ interface AppConfig extends Config {
7070
suggestion: SuggestionConfig[];
7171
addToAnyPlugin: AddToAnyPluginConfig;
7272
followAuthorityMetadata: FollowAuthorityMetadata[];
73+
followAuthorityMaxItemLimit: number;
7374
followAuthorityMetadataValuesLimit: number;
7475
metricVisualizationConfig: MetricVisualizationConfig[];
7576
attachmentRendering: AttachmentRenderingConfig;

src/config/default-app-config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ export class DefaultAppConfig implements AppConfig {
404404
}
405405
];
406406

407+
// The maximum number of item to process when following authority metadata values.
408+
followAuthorityMaxItemLimit = 100;
407409
// The maximum number of metadata values to process for each metadata key
408410
// when following authority metadata values.
409411
followAuthorityMetadataValuesLimit = 5;

src/environments/environment.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ export const environment: BuildConfig = {
276276
metadata: ['dc.contributor.author']
277277
}
278278
],
279+
followAuthorityMaxItemLimit: 100,
279280
followAuthorityMetadataValuesLimit: 5,
280281
item: {
281282
edit: {

0 commit comments

Comments
 (0)