Skip to content

Commit

Permalink
fix (linked-data): Use 'lccnSearchTermProcessor' in linked-data searc…
Browse files Browse the repository at this point in the history
…h APIs (#728)

Closes: MSEARCH-935
  • Loading branch information
pkjacob authored Jan 8, 2025
1 parent e0195a4 commit b58e2f6
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 86 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Fix the "Invalid reference" appears after updating ownership ([MSEARCH-915](https://folio-org.atlassian.net/browse/MSEARCH-915))
* Update tenant_id in database during event processing ([MSEARCH-877](https://folio-org.atlassian.net/browse/MSEARCH-877))
* Fix an issue with interrupting the batch event processing due to SystemUserAuthorizationException ([MSEARCH-925](https://folio-org.atlassian.net/browse/MSEARCH-925))
* Use 'lccnSearchTermProcessor' in linked-data search APIs ([MSEARCH-935](https://folio-org.atlassian.net/browse/MSEARCH-935))

### Tech Dept
* Recreate upload ranges each upload execution ([MSEARCH-934](https://folio-org.atlassian.net/browse/MSEARCH-934))
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/model/linked_data_instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
"lccn": {
"type": "search",
"index": "standard",
"processor": "linkedDataInstanceLccnProcessor"
"processor": "linkedDataInstanceLccnProcessor",
"searchTermProcessor": "lccnSearchTermProcessor"
},
"note": {
"type": "search",
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/model/linked_data_work.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@
"lccn": {
"type": "search",
"index": "standard",
"processor": "linkedDataWorkLccnProcessor"
"processor": "linkedDataWorkLccnProcessor",
"searchTermProcessor": "lccnSearchTermProcessor"
},
"note": {
"type": "search",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,48 +112,49 @@ void searchByLinkedDataInstance_parameterized_allResults(int index, String query
"23, lccn any \"2023202345\"",
"24, lccn any \"2023202345 XXX\"",
"25, lccn all \"2023202345\"",
"26, contributor = Family",
"27, contributor == Meeting",
"28, contributor ==/string Organization",
"29, contributor any Person",
"30, contributor all Family",
"31, hub = *",
"32, hub = hubA*",
"33, hub = hubAAP1",
"34, hub == hubAAP2",
"35, hub ==/string hubAAP1",
"36, hub any \"hubAAP1 hubAAP2 XXX\"",
"37, hub all hubAAP1",
"38, note = *",
"39, note = first*",
"40, note = first instance note",
"41, note == first instance note",
"42, note ==/string first instance note",
"43, note any \"first instance note XXX\"",
"44, note all \"first instance note\"",
"45, lang = *",
"46, lang = ru*",
"47, lang = eng",
"48, lang == rus",
"49, lang ==/string eng",
"50, lang == (\"rus\" or \"eng\" or \"XXX\")",
"51, lang all rus",
"52, format = *",
"53, format = Mono*",
"54, format = monograph",
"55, format == monograph",
"56, format ==/string Monograph",
"57, format any \"Monograph XXX\"",
"58, format all Monograph",
"59, suppressFromDiscovery = false",
"60, suppressFromDiscovery == false",
"61, staffSuppress = true",
"62, staffSuppress == true",
"63, publicationDate = 2023",
"64, publicationDate == 2024",
"65, publicationDate ==/string 2023",
"66, publicationDate == (\"2023\" or \"2024\" or \"2020\")",
"67, publicationDate all 2024"
"26, lccn all \"a b24123456 \"",
"27, contributor = Family",
"28, contributor == Meeting",
"29, contributor ==/string Organization",
"30, contributor any Person",
"31, contributor all Family",
"32, hub = *",
"33, hub = hubA*",
"34, hub = hubAAP1",
"35, hub == hubAAP2",
"36, hub ==/string hubAAP1",
"37, hub any \"hubAAP1 hubAAP2 XXX\"",
"38, hub all hubAAP1",
"39, note = *",
"40, note = first*",
"41, note = first instance note",
"42, note == first instance note",
"43, note ==/string first instance note",
"44, note any \"first instance note XXX\"",
"45, note all \"first instance note\"",
"46, lang = *",
"47, lang = ru*",
"48, lang = eng",
"49, lang == rus",
"50, lang ==/string eng",
"51, lang == (\"rus\" or \"eng\" or \"XXX\")",
"52, lang all rus",
"53, format = *",
"54, format = Mono*",
"55, format = monograph",
"56, format == monograph",
"57, format ==/string Monograph",
"58, format any \"Monograph XXX\"",
"59, format all Monograph",
"60, suppressFromDiscovery = false",
"61, suppressFromDiscovery == false",
"62, staffSuppress = true",
"63, staffSuppress == true",
"64, publicationDate = 2023",
"65, publicationDate == 2024",
"66, publicationDate ==/string 2023",
"67, publicationDate == (\"2023\" or \"2024\" or \"2020\")",
"68, publicationDate all 2024"
})
void searchByLinkedDataInstance_parameterized_singleResult(int index, String query) throws Throwable {
doSearchByLinkedDataInstance(query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,48 +112,49 @@ void searchByLinkedDataWork_parameterized_allResults(int index, String query) th
"23, lccn any \"2023202345\"",
"24, lccn any \"2023202345 XXX\"",
"25, lccn all \"2023202345\"",
"26, contributor = Family",
"27, contributor == Meeting",
"28, contributor ==/string Organization",
"29, contributor any Person",
"30, contributor all Family",
"31, hub = *",
"32, hub = hubA*",
"33, hub = hubAAP1",
"34, hub == hubAAP2",
"35, hub ==/string hubAAP1",
"36, hub any \"hubAAP1 hubAAP2 XXX\"",
"37, hub all hubAAP1",
"38, note = *",
"39, note = first*",
"40, note = first instance note",
"41, note == first instance note",
"42, note ==/string first instance note",
"43, note any \"first instance note XXX\"",
"44, note all \"first instance note\"",
"45, lang = *",
"46, lang = ru*",
"47, lang = eng",
"48, lang == rus",
"49, lang ==/string eng",
"50, lang == (\"rus\" or \"eng\" or \"XXX\")",
"51, lang all rus",
"52, format = *",
"53, format = Mono*",
"54, format = monograph",
"55, format == monograph",
"56, format ==/string Monograph",
"57, format any \"Monograph XXX\"",
"58, format all Monograph",
"59, suppressFromDiscovery = false",
"60, suppressFromDiscovery == false",
"61, staffSuppress = true",
"62, staffSuppress == true",
"63, publicationDate = 2023",
"64, publicationDate == 2024",
"65, publicationDate ==/string 2023",
"66, publicationDate == (\"2023\" or \"2024\" or \"2020\")",
"67, publicationDate all 2024"
"26, lccn all \"a b24123456 \"",
"27, contributor = Family",
"28, contributor == Meeting",
"29, contributor ==/string Organization",
"30, contributor any Person",
"31, contributor all Family",
"32, hub = *",
"33, hub = hubA*",
"34, hub = hubAAP1",
"35, hub == hubAAP2",
"36, hub ==/string hubAAP1",
"37, hub any \"hubAAP1 hubAAP2 XXX\"",
"38, hub all hubAAP1",
"39, note = *",
"40, note = first*",
"41, note = first instance note",
"42, note == first instance note",
"43, note ==/string first instance note",
"44, note any \"first instance note XXX\"",
"45, note all \"first instance note\"",
"46, lang = *",
"47, lang = ru*",
"48, lang = eng",
"49, lang == rus",
"50, lang ==/string eng",
"51, lang == (\"rus\" or \"eng\" or \"XXX\")",
"52, lang all rus",
"53, format = *",
"54, format = Mono*",
"55, format = monograph",
"56, format == monograph",
"57, format ==/string Monograph",
"58, format any \"Monograph XXX\"",
"59, format all Monograph",
"60, suppressFromDiscovery = false",
"61, suppressFromDiscovery == false",
"62, staffSuppress = true",
"63, staffSuppress == true",
"64, publicationDate = 2023",
"65, publicationDate == 2024",
"66, publicationDate ==/string 2023",
"67, publicationDate == (\"2023\" or \"2024\" or \"2020\")",
"68, publicationDate all 2024"
})
void searchByLinkedDataWork_parameterized_singleResult(int index, String query) throws Throwable {
doSearchByLinkedDataWork(query)
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/samples/linked-data/instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
{
"value": " 2023202345",
"type": "LCCN"
},
{
"value": "a b24123456 ",
"type": "LCCN"
}
],
"notes": [
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/samples/linked-data/work.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
{
"value": " 2023202345",
"type": "LCCN"
},
{
"value": "a b24123456 ",
"type": "LCCN"
}
],
"notes": [
Expand Down

0 comments on commit b58e2f6

Please sign in to comment.