diff --git a/config/config.example.yml b/config/config.example.yml index 978ea3b07c7..660b23131a0 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -327,15 +327,6 @@ item: # The maximum number of values for repeatable metadata to show in the full item metadataLimit: 20 -# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected. -# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests -# to efficiently display the search results. -followAuthorityMetadata: - - type: Publication - metadata: dc.contributor.author - - type: Product - metadata: dc.contributor.author - # Collection Page Config collection: edit: @@ -517,3 +508,19 @@ addToAnyPlugin: title: DSpace CRIS 7 demo # The link to be shown in the shared post, if different from document.location.origin (optional) # link: https://dspacecris7.4science.cloud/ + +# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected. +# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests +# to efficiently display the search results. +followAuthorityMetadata: + - type: Publication + metadata: dc.contributor.author + - type: Product + metadata: dc.contributor.author + +# The maximum number of item to process when following authority metadata values. +followAuthorityMaxItemLimit: 100 + +# The maximum number of metadata values to process for each metadata key +# when following authority metadata values. +followAuthorityMetadataValuesLimit: 5 diff --git a/src/app/core/browse/search-manager.ts b/src/app/core/browse/search-manager.ts index 4bb8fb99fff..5afc68c4eea 100644 --- a/src/app/core/browse/search-manager.ts +++ b/src/app/core/browse/search-manager.ts @@ -113,7 +113,7 @@ export class SearchManager { }) .filter((item) => hasValue(item)); - const uuidList = this.extractUUID(items, environment.followAuthorityMetadata, 100); + const uuidList = this.extractUUID(items, environment.followAuthorityMetadata, environment.followAuthorityMaxItemLimit); return uuidList.length > 0 ? this.itemService.findAllById(uuidList).pipe( getFirstCompletedRemoteData(), diff --git a/src/config/app-config.interface.ts b/src/config/app-config.interface.ts index 35db8f911ea..1488c1c173e 100644 --- a/src/config/app-config.interface.ts +++ b/src/config/app-config.interface.ts @@ -70,6 +70,7 @@ interface AppConfig extends Config { suggestion: SuggestionConfig[]; addToAnyPlugin: AddToAnyPluginConfig; followAuthorityMetadata: FollowAuthorityMetadata[]; + followAuthorityMaxItemLimit: number; followAuthorityMetadataValuesLimit: number; metricVisualizationConfig: MetricVisualizationConfig[]; attachmentRendering: AttachmentRenderingConfig; diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index fc6a520986d..99234d781e8 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -404,6 +404,8 @@ export class DefaultAppConfig implements AppConfig { } ]; + // The maximum number of item to process when following authority metadata values. + followAuthorityMaxItemLimit = 100; // The maximum number of metadata values to process for each metadata key // when following authority metadata values. followAuthorityMetadataValuesLimit = 5; diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 959649ae39b..c7df8a62c44 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -276,6 +276,7 @@ export const environment: BuildConfig = { metadata: ['dc.contributor.author'] } ], + followAuthorityMaxItemLimit: 100, followAuthorityMetadataValuesLimit: 5, item: { edit: {