...
Non-functional Requirements
Configurability - The solution should allow disabling/enabling indexing by a feature flag.
Maintainability - The solution should allow changes for different call number types, searching for prefixes/suffixes, etc.
Performance - The solution should not impact reindexing time significantly.
[TBD: Create a NFR Page]
Assumptions
...
In
mod-search
PostgreSQL DBcreate tables for call numbers
The following fields should be present in the table
callnumber
table:callnumber_id
effective_callnumber_components
- set of components for a callnumbercall numbercallnumber
prefix
suffix
callnumber_type_id
volume
enumeration
chronology
copynumber
The following fields should be present in the table
callnumber_instances
table:callnumber_id
item_id
instance_id
shared
tenant_id
location_id
on create/update/delete events for items create a new procedure that would extract call numbers from items
Adjust the Reindexing procedure and Ongoing domain events consuming for items
Create a separate index for call numbers
Refactor browse queries to use
search_after
search_before
queriesThe titles for the browse option can be queried on the fly either from the
instances
table or theinstances
search index
...
The flag whether to extract and store call numbers should be stored in the database
The arrays of records similar to the table structure should be created inside of the procedure to hold call numbers and call number instances
Insert from the arrays into the main tables should be ordered to avoid deadlocks on main table indices
Drawio | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Holding-level Call Numbers
...