-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
- We currently have a base
RecordServiceclass that assumes "Record-like" models backed by both the DB as a primary store for item read/write operations and OpenSearch indices for all list/search operations. - When creating new entities (i.e. the model + service + resource trifecta) that are only stored in the DB and are not backed by OpenSearch indices, we usually subclass from
RecordServiceand override/adapt/remove configuration and functionality that assumes any OpenSearch indexing to get things working. This is necessary because the base class has a lot of convenient functionality for schema validation, results rendering, serialization, and overall ease of configuration.
We have the following use cases so far of services that are DB-only and had to do this:
The proposal is to "lift" some of the functionality overridden/reimplemented in the above use cases into invenio-records-resources, to avoid duplication and benefit across the board from common utilities and features. Some of this common functionality includes:
- Service result classes that can handle DB-paginated objects
- DB-based sorting/filtering/pagination on the
Service.search()method - Specialized Unit of Work operations (instead of custom-defined)
- Removal/skipping of any OpenSearch-specific functionality (services: skip index rebuilding invenio-jobs#42)
- (Optional) possibly aggregations/facets?
Metadata
Metadata
Assignees
Labels
No labels