From d51f4ab0efd957e90fdb44d8275fe702866397ea Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 21 Jan 2026 15:13:24 +0000 Subject: [PATCH 1/2] Add suprot for keyword search on subject with terminal `?` This mirrors the same capablity that NAR search has. --- src/lib/utils_network.js | 1 + src/stores/config.js | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/lib/utils_network.js b/src/lib/utils_network.js index ab92f5fe..e13aa6af 100644 --- a/src/lib/utils_network.js +++ b/src/lib/utils_network.js @@ -541,6 +541,7 @@ const utilsNetwork = { // remove last ? from searchPayload.searchValue and replace the searchtype searchPayload.searchValue = searchPayload.searchValue.replace(/\?$/,'') url = url.replace('searchtype=left','searchtype=keyword') + url = url.replace('searchtype=','searchtype=keyword') } diff --git a/src/stores/config.js b/src/stores/config.js index 98c62cd3..8f5075b0 100644 --- a/src/stores/config.js +++ b/src/stores/config.js @@ -538,20 +538,20 @@ export const useConfigStore = defineStore('config', { "modes":[ { - 'LCSH All':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&count=25&offset=", "all":true}, - 'LCSH Topics':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Topic&count=25&offset="}, - 'LCSH Geographic':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Geographic&count=25&offset="}, - 'LCSH Name':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Name&count=25&offset="}, - 'LCSH FamilyName':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=FamilyName&count=25&offset="}, - 'LCSH CorporateName':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=CorporateName&count=25&offset="}, - 'LCSH GenreForm':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=GenreForm&count=25&offset="}, - 'LCSH Simple Type':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=SimpleType&count=25&offset="}, - 'LCSH Complex Subject':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=ComplexSubject&count=25&offset="}, - 'LCSH Temporal':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Temporal&count=25&offset="}, - - 'LCSH Auth Subjects':{"url":"http://id.loc.gov/authorities/subjects/suggest2/?q=&memberOf=http://id.loc.gov/authorities/subjects/collection_LCSHAuthorizedHeadings&count=25&offset="}, - 'LCSH SubDiv Subjects':{"url":"http://id.loc.gov/authorities/subjects/suggest2/?q=&memberOf=http://id.loc.gov/authorities/subjects/collection_Subdivisions&count=25&offset="}, - 'LCSH GnFrm Subjects':{"url":"http://id.loc.gov/authorities/genreForms/suggest2/?q=&memberOf=http://id.loc.gov/authorities/genreForms/collection_LCGFT_General&count=25&offset="}, + 'LCSH All':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&count=25&offset=&searchtype=left", "all":true}, + 'LCSH Topics':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Topic&count=25&offset=&searchtype=left"}, + 'LCSH Geographic':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Geographic&count=25&offset=&searchtype=left"}, + 'LCSH Name':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Name&count=25&offset=&searchtype=left"}, + 'LCSH FamilyName':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=FamilyName&count=25&offset=&searchtype=left"}, + 'LCSH CorporateName':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=CorporateName&count=25&offset=&searchtype=left"}, + 'LCSH GenreForm':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=GenreForm&count=25&offset=&searchtype=left"}, + 'LCSH Simple Type':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=SimpleType&count=25&offset=&searchtype=left"}, + 'LCSH Complex Subject':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=ComplexSubject&count=25&offset=&searchtype=left"}, + 'LCSH Temporal':{"url":"https://id.loc.gov/authorities/subjects/suggest2/?q=&rdftype=Temporal&count=25&offset=&searchtype=left"}, + + 'LCSH Auth Subjects':{"url":"http://id.loc.gov/authorities/subjects/suggest2/?q=&memberOf=http://id.loc.gov/authorities/subjects/collection_LCSHAuthorizedHeadings&count=25&offset=&searchtype=left"}, + 'LCSH SubDiv Subjects':{"url":"http://id.loc.gov/authorities/subjects/suggest2/?q=&memberOf=http://id.loc.gov/authorities/subjects/collection_Subdivisions&count=25&offset=&searchtype=left"}, + 'LCSH GnFrm Subjects':{"url":"http://id.loc.gov/authorities/genreForms/suggest2/?q=&memberOf=http://id.loc.gov/authorities/genreForms/collection_LCGFT_General&count=25&offset=&searchtype=left"}, } ] }, From 5cbdde32e33db03a451967ed0250fcfbc73cdef8 Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 21 Jan 2026 15:26:57 +0000 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b8a4b94..06617405 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## [1.4.7] - 2025-01-20 ### Changed - ClassWeb search will search `LCSH (w/names)` to do a combined search. +- Ability to keyword search subject by appending `?` to the search term ## [1.4.6] - 2025-01-16 ### Added