Skip to content

Commit

Permalink
Merge branch 'Index-source-IDs' of https://github.com/wellcomecollect…
Browse files Browse the repository at this point in the history
…ion/catalogue-pipeline into Index-source-IDs
  • Loading branch information
StepanBrychta committed Nov 12, 2024
2 parents 0ff314d + f6ea949 commit 4578017
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ object ValueTransforms {
sourceIdentifier +: otherIdentifiers
}
.flatten
.map(_.value).toList
.map(_.value)
.toList
}

// Shelfmarks are only available on physical locations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ case object WorkQueryableValues {
identifiersValue =
(sourceIdentifier +: data.otherIdentifiers).map(_.value),
imagesId = data.imageData.map(_.id).canonicalIds,
imagesIdentifiersValue =
data.imageData.map(_.id).sourceIdentifiers,
imagesIdentifiersValue = data.imageData.map(_.id).sourceIdentifiers,
itemsId = data.items.map(_.id).canonicalIds,
itemsIdentifiersValue =
data.items.flatMap(_.id.allSourceIdentifiers).map(_.value),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ case class ImageFilterableValues(
@JsonKey("source.subjects.concepts.id") sourceSubjectsConceptsId: List[
String
],
@JsonKey("source.subjects.concepts.sourceId") sourceSubjectsConceptsSourceId: List[
@JsonKey(
"source.subjects.concepts.sourceId"
) sourceSubjectsConceptsSourceId: List[
String
],
@JsonKey(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ case class WorkFilterableValues(
@JsonKey("subjects.concepts.sourceId") subjectsConceptsSourceId: List[String],
@JsonKey("contributors.agent.label") contributorsAgentLabel: List[String],
@JsonKey("contributors.agent.id") contributorsAgentId: List[String],
@JsonKey("contributors.agent.sourceId") contributorsAgentSourceId: List[String],
@JsonKey("contributors.agent.sourceId") contributorsAgentSourceId: List[
String
],
@JsonKey("identifiers.value") identifiersValue: List[String],
@JsonKey("items.locations.license.id") itemsLocationsLicenseId: List[String],
@JsonKey(
Expand Down Expand Up @@ -49,14 +51,16 @@ object WorkFilterableValues {
concept <- genreConcepts(work.data.genres)
id <- concept.id.maybeCanonicalId
} yield id.underlying,
genresConceptsSourceId = genreConcepts(work.data.genres).map(_.id).sourceIdentifiers,
genresConceptsSourceId =
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,
contributorsAgentLabel =
work.data.contributors.map(_.agent.label).map(queryableLabel),
contributorsAgentId = work.data.contributors.map(_.agent.id).canonicalIds,
contributorsAgentSourceId = work.data.contributors.map(_.agent.id).sourceIdentifiers,
contributorsAgentSourceId =
work.data.contributors.map(_.agent.id).sourceIdentifiers,
identifiersValue =
(work.sourceIdentifier +: work.data.otherIdentifiers).map(_.value),
itemsLocationsLicenseId =
Expand Down

0 comments on commit 4578017

Please sign in to comment.