Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(search-instances): Index, search Index Instance place of publication field #614

Merged
merged 4 commits into from
Jul 2, 2024
Merged
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
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* Implement Indexing of Libraries from Kafka ([MSEARCH-769](https://issues.folio.org/browse/MSEARCH-769))
* Return Unified List of Inventory Campuses in a Consortium ([MSEARCH-773](https://issues.folio.org/browse/MSEARCH-773))
* Return Unified List of Inventory Libraries in a Consortium ([MSEARCH-772](https://issues.folio.org/browse/MSEARCH-772))
* Index, search Instance place of publication field ([MSEARCH-755](https://folio-org.atlassian.net/browse/MSEARCH-755))

### Bug fixes
* Do not delete kafka topics if collection topic is enabled ([MSEARCH-725](https://folio-org.atlassian.net/browse/MSEARCH-725))
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/model/instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
"dateOfPublication": {
"index": "source",
"showInResponse": [ "search", "call-number-browse" ]
},
"place": {
"index": "standard"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ value:
publication:
- publisher: "Duncker und Humblot"
dateOfPublication: "1976"
place: Karlsruhe
staffSuppress: false
discoverySuppress: false
isBoundWith: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ properties:
type: string
dateOfPublication:
description: "Date (year YYYY) of publication, distribution, etc."
type: string
place:
description: "Place of publication, distribution, etc."
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ static void cleanUp() {
"Antoniou matthew",
"HD1691 .I5 1967",
"Cambridge, Mass.",
"MIT Press",
"c2004",

// holding field values
"e3ff6133-b9a2-4d4c-a1c9-dc1867d4df19",
Expand Down Expand Up @@ -76,7 +78,9 @@ void canSearchByAllFieldValues_positive(String cqlQuery) throws Throwable {
"HD1691 .I5 1967",
"Cambridge, Mass.",
"2020-12-08T15:47:13.625+00:00",
"2020-12-08T15:47:13.625+0000"
"2020-12-08T15:47:13.625+0000",
"MIT Press",
"c2004"
})
@ParameterizedTest(name = "[{index}] cql.allInstances='{query}', query=''{0}''")
void canSearchByInstanceFieldValues_positive(String cqlQuery) throws Throwable {
Expand Down
12 changes: 12 additions & 0 deletions src/test/java/org/folio/search/controller/SearchInstanceIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ private static Stream<Arguments> testDataProvider() {
arguments("publisher all {value}", "mit"),
arguments("publisher all {value}", "press"),

arguments("publication.place all {value}", "cambridge"),
arguments("publication.place all {value}", "Cambridge"),
arguments("publication.place all {value}", "mass"),
arguments("publication.place all {value}", "Mass."),
arguments("publication.place any {value}", "Cambridge mass"),
arguments("publication.place all {value}", "Cambridge mass"),
arguments("publication.place = {value}", "\"Cambridge, Mass.\""),
arguments("publication.place == {value}", "Cambridge"),
arguments("publication.place ==/string {value}", "\"Cambridge, Mass.\""),
arguments("publication.place = {value}", "Cambridge, Ma*"),
arguments("publication.place = {value}", "\"*mbridge, Mass.\""),

arguments("contributors all {value}", "frank"),
arguments("contributors all {value}", "Frank"),
arguments("contributors all {value}", "grigoris"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@
"publication": [
{
"publisher": "MIT Press",
"dateOfPublication": "c2004"
"dateOfPublication": "c2004",
"place": "Cambridge, Mass. "
}
],
"staffSuppress": false,
Expand Down
Loading