two improved item-enhancer scripts extending the current implementation
Enhancer Scripts:ItemEnhancerEntityType
item-enhancer-type
database-based approach
-c --collection : restrict enhancement to all Items of a collection
-e --entitytype : restrict enhancement to all Items of a given type
-m --max : only enhance a maximum number of items (e.g. test result or effect on new enhancer)
-m && -e : restrict enhancement to limited number of Items of a given type of all collections
-l --limit : use some limit after which some commit is made (avoid long time processes and one single commit on all entities)
-o --offset: enhance skipping the first items. Usable together with max for pagination.
Use case: apply new enhancers on some fractial of the repositories content saving time.
Options:
ItemEnhancerByDate*
item-enhancer-date
solr-based approach
-c --collection restrict enhancement to all Items of a collection
-e --entity : restrict enhancement to all Items of a given entity type
-m --max : only enhance a maximum number of items (e.g. test result or effect on new enhancer)
-l --limit : use some limit after which some commit is made (avoid long time processes and one single commit on all entities)
-s --datelower-d --dateupper : apply some solr daterange filter on the lastModified date (enhance all items modified between x and y || enhance all items modified before date z)
-q --query apply some general solr-filter (e.g. enhance all items matching some criteria, e.g. not enhanced by some cris.virtual.* field or some other criteria yet)
Use case: reapply enhancers on some run where some enhancement was suddenly broken.
Use case: Enhance all items modified between some timespan
Include guidance for how to test or review your PR.
provided some test case. The tests are the same as in the ItemEnhancerScriptIT , so the enhancement of the common enhancment should lead to the same result.
In addition extended with further test cases about the script options
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
[ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
[x] My PR passes Checkstyle validation based on the Code Style Guide.
[ ] My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
[x] My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
[ ] If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[ ] If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
[ ] If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
References
Add references/links to any related issues or PRs. These may include:
Description
Enhancer Scripts: ItemEnhancerEntityType
item-enhancer-type
-c --collection
: restrict enhancement to all Items of a collection-e --entitytype
: restrict enhancement to all Items of a given type-m --max
: only enhance a maximum number of items (e.g. test result or effect on new enhancer)-m && -e
: restrict enhancement to limited number of Items of a given type of all collections-l --limit
: use some limit after which some commit is made (avoid long time processes and one single commit on all entities)-o --offset
: enhance skipping the first items. Usable together with max for pagination.Options:
ItemEnhancerByDate*
item-enhancer-date
-c --collection
restrict enhancement to all Items of a collection-e --entity
: restrict enhancement to all Items of a given entity type-m --max
: only enhance a maximum number of items (e.g. test result or effect on new enhancer)-l --limit
: use some limit after which some commit is made (avoid long time processes and one single commit on all entities)-s --datelower
-d --dateupper
: apply some solr daterange filter on the lastModified date (enhance all items modified between x and y || enhance all items modified before date z)-q --query
apply some general solr-filter (e.g. enhance all items matching some criteria, e.g. not enhanced by some cris.virtual.* field or some other criteria yet)Include guidance for how to test or review your PR.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
pom.xml
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.