Skip to content

Commit

Permalink
Rename sourceId to sourceIdentifier #5820
Browse files Browse the repository at this point in the history
  • Loading branch information
StepanBrychta committed Nov 13, 2024
1 parent aeeddd3 commit 58cb392
Show file tree
Hide file tree
Showing 46 changed files with 187 additions and 187 deletions.
6 changes: 3 additions & 3 deletions index_config/mappings.images_indexed.2024-11-06.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"label": {
"type": "keyword"
},
"sourceId": {
"sourceIdentifier": {
"type": "keyword",
"normalizer": "lowercase"
}
Expand All @@ -85,7 +85,7 @@
"id": {
"type": "keyword"
},
"sourceId": {
"sourceIdentifier": {
"type": "keyword",
"normalizer": "lowercase"
}
Expand Down Expand Up @@ -118,7 +118,7 @@
"id": {
"type": "keyword"
},
"sourceId": {
"sourceIdentifier": {
"type": "keyword",
"normalizer": "lowercase"
}
Expand Down
6 changes: 3 additions & 3 deletions index_config/mappings.works_indexed.2024-11-06.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"id": {
"type": "keyword"
},
"sourceId": {
"sourceIdentifier": {
"type": "keyword",
"normalizer": "lowercase"
}
Expand All @@ -129,7 +129,7 @@
"id": {
"type": "keyword"
},
"sourceId": {
"sourceIdentifier": {
"type": "keyword",
"normalizer": "lowercase"
}
Expand Down Expand Up @@ -229,7 +229,7 @@
"id": {
"type": "keyword"
},
"sourceId": {
"sourceIdentifier": {
"type": "keyword",
"normalizer": "lowercase"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ case class ImageFilterableValues(
"source.contributors.agent.id"
) sourceContributorsAgentId: List[String],
@JsonKey(
"source.contributors.agent.sourceId"
) sourceContributorsAgentSourceId: List[String],
"source.contributors.agent.sourceIdentifier"
) sourceContributorsAgentSourceIdentifier: List[String],
@JsonKey("source.genres.label") sourceGenresLabel: List[String],
@JsonKey("source.genres.concepts.id") sourceGenresConceptsId: List[String],
@JsonKey(
"source.genres.concepts.sourceId"
) sourceGenresConceptsSourceId: List[String],
"source.genres.concepts.sourceIdentifier"
) sourceGenresConceptsSourceIdentifier: List[String],
@JsonKey("source.subjects.label") sourceSubjectsLabel: List[String],
@JsonKey("source.subjects.concepts.id") sourceSubjectsConceptsId: List[
String
],
@JsonKey(
"source.subjects.concepts.sourceId"
) sourceSubjectsConceptsSourceId: List[
"source.subjects.concepts.sourceIdentifier"
) sourceSubjectsConceptsSourceIdentifier: List[
String
],
@JsonKey(
Expand All @@ -44,7 +44,7 @@ object ImageFilterableValues extends ImageValues {
sourceContributorsAgentId = fromParentWork(image.source)(
_.data.contributors.map(_.agent.id).canonicalIds
),
sourceContributorsAgentSourceId = fromParentWork(image.source)(
sourceContributorsAgentSourceIdentifier = fromParentWork(image.source)(
_.data.contributors.map(_.agent.id).sourceIdentifiers
),
sourceGenresLabel = fromParentWork(image.source)(
Expand All @@ -56,7 +56,7 @@ object ImageFilterableValues extends ImageValues {
.flatMap(_.id.maybeCanonicalId)
.map(_.underlying)
),
sourceGenresConceptsSourceId = fromParentWork(image.source)(
sourceGenresConceptsSourceIdentifier = fromParentWork(image.source)(
work =>
genreConcepts(work.data.genres)
.map(_.id)
Expand All @@ -68,7 +68,7 @@ object ImageFilterableValues extends ImageValues {
sourceSubjectsConceptsId = fromParentWork(image.source)(
_.data.subjects.map(_.id).canonicalIds
),
sourceSubjectsConceptsSourceId = fromParentWork(image.source)(
sourceSubjectsConceptsSourceIdentifier = fromParentWork(image.source)(
_.data.subjects.map(_.id).sourceIdentifiers
),
sourceProductionDatesRangeFrom = fromParentWork(image.source)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ class ImageFilterableValuesTest
List("M.A.C.T", "McGlashan, Alan Fleming, 1898-1997"),
sourceContributorsAgentId =
List("npanm646", "wfkwqmmx"),
sourceContributorsAgentSourceId = List("m.a.c.t", "mcglashan, alan fleming, 1898-1997"),
sourceContributorsAgentSourceIdentifier = List("m.a.c.t", "mcglashan, alan fleming, 1898-1997"),
sourceGenresLabel = List("Ink drawings", "Drawings"),
sourceGenresConceptsId = List("h5fvmn9u", "tgxvuh8x"),
sourceGenresConceptsSourceId = List("ink drawings", "drawings"),
sourceGenresConceptsSourceIdentifier = List("ink drawings", "drawings"),
sourceSubjectsLabel = List(
"Jungian psychology",
"Dreams",
"McGlashan, Alan Fleming, 1898-1997"
),
sourceSubjectsConceptsId =
List("bse2dtxc", "hjw49bkh", "wfkwqmmx"),
sourceSubjectsConceptsSourceId = List("sh95006221", "sh85039483", "mcglashan, alan fleming, 1898-1997"),
sourceSubjectsConceptsSourceIdentifier = List("sh95006221", "sh85039483", "mcglashan, alan fleming, 1898-1997"),
sourceProductionDatesRangeFrom = List(0)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ case class WorkFilterableValues(
@JsonKey("languages.id") languagesId: List[String],
@JsonKey("genres.label") genresLabel: List[String],
@JsonKey("genres.concepts.id") genresConceptsId: List[String],
@JsonKey("genres.concepts.sourceId") genresConceptsSourceId: List[String],
@JsonKey("genres.concepts.sourceIdentifier") genresConceptsSourceIdentifier: List[String],
@JsonKey("subjects.label") subjectsLabel: List[String],
@JsonKey("subjects.concepts.id") subjectsConceptsId: List[String],
@JsonKey("subjects.concepts.sourceId") subjectsConceptsSourceId: List[String],
@JsonKey("subjects.concepts.sourceIdentifier") subjectsConceptsSourceIdentifier: List[String],
@JsonKey("contributors.agent.label") contributorsAgentLabel: List[String],
@JsonKey("contributors.agent.id") contributorsAgentId: List[String],
@JsonKey("contributors.agent.sourceId") contributorsAgentSourceId: List[
@JsonKey("contributors.agent.sourceIdentifier") contributorsAgentSourceIdentifier: List[
String
],
@JsonKey("identifiers.value") identifiersValue: List[String],
Expand Down Expand Up @@ -51,15 +51,15 @@ object WorkFilterableValues {
concept <- genreConcepts(work.data.genres)
id <- concept.id.maybeCanonicalId
} yield id.underlying,
genresConceptsSourceId =
genresConceptsSourceIdentifier =
genreConcepts(work.data.genres).map(_.id).sourceIdentifiers,
subjectsLabel = work.data.subjects.map(_.label).map(queryableLabel),
subjectsConceptsId = work.data.subjects.map(_.id).canonicalIds,
subjectsConceptsSourceId = work.data.subjects.map(_.id).sourceIdentifiers,
subjectsConceptsSourceIdentifier = work.data.subjects.map(_.id).sourceIdentifiers,
contributorsAgentLabel =
work.data.contributors.map(_.agent.label).map(queryableLabel),
contributorsAgentId = work.data.contributors.map(_.agent.id).canonicalIds,
contributorsAgentSourceId =
contributorsAgentSourceIdentifier =
work.data.contributors.map(_.agent.id).sourceIdentifiers,
identifiersValue =
(work.sourceIdentifier +: work.data.otherIdentifiers).map(_.value),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class WorkFilterableValuesTest
languagesId = List("eng"),
genresLabel = List("Ink drawings", "Drawings"),
genresConceptsId = List("h5fvmn9u", "tgxvuh8x"),
genresConceptsSourceId = List("ink drawings", "drawings"),
genresConceptsSourceIdentifier = List("ink drawings", "drawings"),
subjectsLabel = List(
"Jungian psychology",
"Dreams",
Expand All @@ -33,11 +33,11 @@ class WorkFilterableValuesTest
"hjw49bkh",
"wfkwqmmx"
),
subjectsConceptsSourceId = List("sh95006221", "sh85039483", "mcglashan, alan fleming, 1898-1997"),
subjectsConceptsSourceIdentifier = List("sh95006221", "sh85039483", "mcglashan, alan fleming, 1898-1997"),
contributorsAgentLabel =
List("M.A.C.T", "McGlashan, Alan Fleming, 1898-1997"),
contributorsAgentId = List("npanm646", "wfkwqmmx"),
contributorsAgentSourceId = List("m.a.c.t", "mcglashan, alan fleming, 1898-1997"),
contributorsAgentSourceIdentifier = List("m.a.c.t", "mcglashan, alan fleming, 1898-1997"),
identifiersValue = List("b16582962", "1658296", "658296i", "L0045108"),
itemsLocationsLicenseId = List("cc-by"),
itemsLocationsAccessConditionsStatusId = List("open", "open"),
Expand Down
8 changes: 4 additions & 4 deletions pipeline/ingestor/test_documents/image-production.1098.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pipeline/ingestor/test_documents/image-production.1900.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pipeline/ingestor/test_documents/image-production.1904.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pipeline/ingestor/test_documents/image-production.1976.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pipeline/ingestor/test_documents/image-production.2020.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pipeline/ingestor/test_documents/images.contributors.0.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 58cb392

Please sign in to comment.