Skip to content

Commit fb400dc

Browse files
authored
DLSR-5: use sort_title_tsort instead of sort_title_ssort (#1228)
minor changes: - fix a bug where we sorted solr field 'exists' ascending (no value first) instead of descending (records with a value come first) - remove very old solr config - current config is in https://github.com/uclalibrary/calursus-solr - auto-accept chromatic changes when running after a merge to main
1 parent 2e817de commit fb400dc

21 files changed

Lines changed: 23 additions & 2069 deletions

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,19 @@ jobs:
5555
with:
5656
working-directory: e2e
5757
browser: chrome
58-
- name: Run Chromatic
58+
- name: Run Chromatic (PR)
59+
if: github.event_name == 'pull_request'
5960
working-directory: e2e
6061
env:
6162
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
6263
ELECTRON_EXTRA_LAUNCH_ARGS: --remote-debugging-port=9222
6364
run: npx chromatic --cypress --project-token=$CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes
65+
- name: Run Chromatic (Merged)
66+
working-directory: e2e
67+
env:
68+
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
69+
ELECTRON_EXTRA_LAUNCH_ARGS: --remote-debugging-port=9222
70+
run: npx chromatic --cypress --project-token=$CHROMATIC_PROJECT_TOKEN --auto-accept-changes
6471

6572
- name: Stop docker services
6673
run: docker-compose down

app/controllers/catalog_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ class CatalogController < ApplicationController
387387
# (it must be asc or desc except in the relevancy case)
388388
# label is key, solr field is value
389389
config.add_sort_field 'score desc', label: 'Relevance'
390-
config.add_sort_field 'exists(sort_title_ssort) asc, sort_title_ssort asc, exists(title_alpha_numeric_ssort) asc, title_alpha_numeric_ssort asc', label: 'Title (A-Z)'
391-
config.add_sort_field 'exists(sort_title_ssort) asc, sort_title_ssort desc, exists(title_alpha_numeric_ssort) asc, title_alpha_numeric_ssort desc', label: 'Title (Z-A)'
390+
config.add_sort_field 'exists(sort_title_tsort) desc, sort_title_tsort asc, exists(title_alpha_numeric_ssort) desc, title_alpha_numeric_ssort asc', label: 'Title (A-Z)'
391+
config.add_sort_field 'exists(sort_title_tsort) desc, sort_title_tsort desc, exists(title_alpha_numeric_ssort) desc, title_alpha_numeric_ssort desc', label: 'Title (Z-A)'
392392
# config.add_sort_field 'title_alpha_numeric_ssort asc', label: 'Title (A-Z)'
393393
# config.add_sort_field 'title_alpha_numeric_ssort desc', label: 'Title (Z-A)'
394394
config.add_sort_field 'date_dtsort desc', label: 'Date (newest)'

solr/conf/_rest_managed.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

solr/conf/admin-extra.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

solr/conf/elevate.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.

solr/conf/mapping-ISOLatin1Accent.txt

Lines changed: 0 additions & 246 deletions
This file was deleted.

solr/conf/protwords.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)