Browse Instance classification numbers - Phase 1 POC
Summary
The implementation of the instance-level classification search and browsing features is a part of FOLIO's future features. The feature is closely related to call number browse for instance items and similar or the same approach should be reused. However, current implementation is known to have particular limitations and one of the goals of this design is to overcome those limitations and prepare a solution that can also be applied to Item-level call number browse functionality. The context for the design is listed below:
- Effective item call numbers are the only call numbers that can be browsed
- Cannot search or browse instance/bibliographic classification
- Some libraries shelflist by the bibliographic call number instead of the item-level call number
In Q Release the implementation should be treated as POC. The goals are:
- Validate the approach and reusability for item/holding-level call number browse and search functionality
- Assess the impact on data import and reindex.
Requirements
Functional Requirements
Call number browse requirements overview - DRAFT
Non-functional Requirements
- Performance:
- Should limited impact the data import procedure.
- Should limited impact on the reindexing procedure
- Maintainability:
- Simplify the existing solution and allow it to be reused for future features like holding classification
- Remove the limitation of 10 characters
Solution Options
Option | Status | Pros | Cons | |
---|---|---|---|---|
1 | Use the existing solution with item-level call-number browse and range-search | Declined due to limitations of existing algorithm |
| |
2 | Separate index instance_classifications with search_after approach similar to authors and contributors | Declined due to the complexity of the approach in ECS environments |
|
|
3 | Creation of instance_classifications table in mod-search PostgreSQL db that will handle updates and search index instance_classifications with search_after approach | Target solution |
|
|
Target Architecture
Approach:
The approach is designed for FOLIO standalone mode and ECS mode. The document in the classification search index can relate to multiple instance records in single or different tenants. This means that the document should be updated whenever the instance classification number was changed or removed. The complexity of updates in OpenSearch/ElasticSearch indexes negatively affects the performance of the reindexing procedure. To improve the performance of reindexing it is proposed to create a classification table in PostgreSQL database of mod-search
where all update/insert/delete operations will happen. This will remove the complexity of partial update of the search index document.
- Create a new table in the database of
mod-search
:Table structure
Field Type tenant_id character varying classification_type UUID classification_number character varying instance_id UUID shared boolean
- Create a new index
instance-classifications
in OpenSearch- Classification identifier: should be calculated as a concatenation of classification type and number
- Classification number
- ClassificationTypeId
- Effective shelving order
- List of shared flags per tenant
mod-search
should extract the classifications list and update the records in the classifications table in the databasemod-search
should query the database and insert the document in the search index.- Browse:
- Browse functionality combines two search_after queries sorted by effective shelving order around the anchor record.
- Users should be able to navigate from browse results to related Instances in the search
Indexing Sequence Diagram:
Browsing Sequence Diagram:
Questions
Question | Answer | |
---|---|---|
1 | An instance can have multiple classifications with different types. Does that mean that an instance cannot have two or more classifications with the same type? | Christine Schultz-Richert : technically, yes one instance could have classifications of the same type (there shouldn't be, but the MARC standard indicates that the classification fields are repeatable) |
2 | Can two instances have the same classification type and number? | Christine Schultz-Richert : It is unlikely that two instances have the same classification, however it is definitely possible |