Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/update_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Update Config Yaml

on:
workflow_dispatch:
schedule:
- cron: '0 8 1 * *' #8AM first of the month

jobs:
update-translation-maps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch Library Collections Yaml
working-directory: ./config
run: wget -O collection_map.yaml https://raw.githubusercontent.com/mlibrary/search.catalog-index/refs/heads/main/umich_catalog_indexing/lib/translation_maps/umich/collection_map.yaml
- name: Get PR title
run: echo "PR_TITLE=$(date +'%B %Y') update config" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "config: update collection yaml"
title: ${{ env.PR_TITLE }}
branch: update-config
23 changes: 4 additions & 19 deletions config/locColl.yaml → config/collection_map.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This is structured for Advanced Search in Spectrum. The "ALL" collections and
# the "desc" field are needed for spectrum but not for indexing. It lives in
# search.catalog-indexing because this has more to do with Alma and indexing
# than the library search front end. mrio 2026-03-06
---
ALL:
desc: 'All locations'
Expand Down Expand Up @@ -43,11 +47,6 @@ BSTA:
BSTA OVR: 'Oversize'
BSTA REF: 'Reference'
#updated 2025-02-21
BUHR:
desc: 'Buhr Shelving Facility'
collections:
ALL: All collections
#all locations combined in grouping
CLEM:
desc: 'William L. Clements'
collections:
Expand Down Expand Up @@ -148,14 +147,6 @@ HATCH:
HATCH SAR: 'South Asia Reference'
HATCH SEAR: 'Southeast Asia Reference'
#updated 2025-02-21
HSRS:
desc: 'Health Sciences Remote Storage'
collections:
ALL: All collections
HSRS IND: 'Indexes'
HSRS OVR: 'Oversize'
HSRS PER: 'Journals'
HSRS STOR: ''
MUSIC:
desc: 'Music'
collections:
Expand Down Expand Up @@ -216,12 +207,6 @@ MUSM:
MUSM CAGE: 'Room 2500 - Cage - By appointment only'
MUSM OVR: 'Room 2500 - Oversize'
MUSM SPE: 'Special Formats'
OFFS:
desc: 'Offsite Shelving'
collections:
ALL: All collections
OFFS ELLS: ''
OFFS STATE: ''
SHAP:
desc: 'Shapiro'
collections:
Expand Down
2 changes: 1 addition & 1 deletion config/foci/00-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ facets:

hierarchy:
load_inst: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/instLocs.yaml
load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/locColl.yaml
load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/collection_map.yaml
field: Library
uid: institution
aliases:
Expand Down
2 changes: 1 addition & 1 deletion config/foci/03-onlinejournals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ facets:

hierarchy:
load_inst: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/instLocs.yaml
load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/locColl.yaml
load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/collection_map.yaml
field: Library
uid: institution
aliases:
Expand Down
15 changes: 6 additions & 9 deletions config/instLocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ clements:
bentley:
sublibs:
BENT: Bentley Historical
#umtri:
# sublibs:
# UMTRI: Transportation Research Institute Library
flint:
sublibs:
FLINT: Flint Thompson Library
Expand All @@ -17,11 +14,11 @@ aa:
AAEL: Art Architecture & Engineering
FVL: Askwith Media Library
BSTA: Biological Station
BUHR: Buhr Shelving Facility
CSCAR: CSCAR - Rackham Building
# BUHR: Buhr Shelving Facility
# CSCAR: CSCAR - Rackham Building
FINE: Fine Arts
HATCH: Hatcher Graduate
HSRS: Health Sciences Remote Shelving
# HSRS: Health Sciences Remote Shelving
MUSM: Research Museums Center
MUSIC: Music
SHAP: Shapiro
Expand All @@ -34,12 +31,12 @@ all:
FVL: Askwith Media Library
BENT: Bentley Historical
BSTA: Biological Station
BUHR: Buhr Shelving Facility
CSCAR: CSCAR - Rackham Building
# BUHR: Buhr Shelving Facility
# CSCAR: CSCAR - Rackham Building
FINE: Fine Arts
FLINT: Flint Thompson Library
HATCH: Hatcher Graduate
HSRS: Health Sciences Remote Shelving
# HSRS: Health Sciences Remote Shelving
MUSM: Research Museums Center
MUSIC: Music
SHAP: Shapiro
Expand Down
34 changes: 16 additions & 18 deletions overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,45 @@ Areas of confusion or inconsistency:

## Where the code lives

* https://github.com/mlibrary/spectrum
* <https://github.com/mlibrary/spectrum>

This repository, the rails app hosting the spectrum-json gem engine

These two are the main parts from CLIO that we're still using.

* https://github.com/mlibrary/spectrum/tree/master/app/models/spectrum/search_engines/solr.rb
* https://github.com/mlibrary/spectrum/tree/master/app/models/spectrum/search_engines/summon.rb
* <https://github.com/mlibrary/spectrum/tree/master/app/models/spectrum/search_engines/solr.rb>
* <https://github.com/mlibrary/spectrum/tree/master/app/models/spectrum/search_engines/summon.rb>

Otherwise, these are probably also somewhat relevant:
* https://github.com/mlibrary/spectrum/tree/master/lib/keycard/
* https://github.com/mlibrary/spectrum/tree/master/config/
* <https://github.com/mlibrary/spectrum/tree/master/lib/keycard/>
* <https://github.com/mlibrary/spectrum/tree/master/config/>

* https://github.com/mlibrary/spectrum-config
* <https://github.com/mlibrary/spectrum-config>

The repository for the spectrum-json configuration processing and logic.
Entirely new code.

* https://github.com/mlibrary/spectrum-json
* <https://github.com/mlibrary/spectrum-json>

The gem engine that handles requests for spectrum.
Entirely new code.

* https://github.com/mlibrary/pride
* <https://github.com/mlibrary/pride>

The javascript library for interacting with spectrum-json for search-related functions.

* https://github.com/mlibrary/prejudice
* <https://github.com/mlibrary/prejudice>

The javascript library for interacting with spectrum-json for personalization-related functions.

* https://github.com/mlibrary/search
* <https://github.com/mlibrary/search>

The React-based front-end for Search

## Where the configuration lives

* git repository on a local-directory on a dev server
* moku dev / search-testing
* git repository on a local-directory on a dev server
* moku dev / search-testing

## Configuration files

Expand All @@ -67,16 +67,14 @@ Areas of confusion or inconsistency:

* `config/fields.yml`

Where each field is defined. The intention was to allow the field definitions to be shared across datastores so that fielded search concepts could be made to work across multiple datastores. This didn't work so well in practice.

Where each field is defined. The intention was to allow the field definitions to be shared across datastores so that fielded search concepts could be made to work across multiple datastores. This didn't work so well in practice.

A lot of these configuration files ended up being mappings from catalog codes to human readable text or urls. Or providing information on how some hierarchical data is structured.

* `config/sorts.yml`

Where each sort option is defined. The intention was to allow the sorting to be shared across datastores so that the same sort concept could be made to work across multiple datastores. That didn't work so well in practice.


* `config/actions.yml`

Defines actions a user can take on a record, like exporting to email, sms, or a file download.
Expand All @@ -99,7 +97,7 @@ A lot of these configuration files ended up being mappings from catalog codes to

Describes services available to patrons based on their role at the university.

* `config/keycard.yml`
* `config/keycard.yml`

This is a configuration for an expansion of an early version of keycard to support IP addrresses defined in a yaml file, and ldap. Some of that functionality may have been incorporated into keycard itself. We used a fork of keycard because at that time, keycard had a dependency on ActiveRecord.

Expand All @@ -111,7 +109,7 @@ A lot of these configuration files ended up being mappings from catalog codes to

TODO: Remove this file and any code that depends on it if possible.

* `config/locColl.yaml`, `config/instLocs.yaml`, `config/floor_locations.json`
* `config/collection_map.yaml`, `config/instLocs.yaml`

These are generated by AIM and written outside of the search directory, and loaded on application startup.
That is inconsistent with the moku model, so copies are supplied here.
Expand Down Expand Up @@ -141,7 +139,7 @@ Broad overview of what happens when a search is conducted by an end user.
5. Results from the multi-search return to Pride, and the record metadata is augmented from Prejudice.
6. Search is notified of the new records asynchronously, and the Redux state is updated, leading to React drawing the search results.

## Lifecycle of a request in Spectrum.
## Lifecycle of a request in Spectrum

Detailed walkthrough of what happens when a search request is received by Spectrum

Expand Down
Loading