Skip to content

SCRUM-4816: rename anatomicalExpression to anatomicalExpressionSlim#1541

Merged
oblodgett merged 2 commits intostagefrom
SCRUM-4816
Mar 30, 2026
Merged

SCRUM-4816: rename anatomicalExpression to anatomicalExpressionSlim#1541
oblodgett merged 2 commits intostagefrom
SCRUM-4816

Conversation

@oblodgett
Copy link
Copy Markdown
Member

Summary

  • Rename anatomicalExpression to anatomicalExpressionSlim in ES mapping and SearchHelper
  • Aligns field name with its purpose (UBERON slim terms)

Coordinated with

  • agr_curation PR #2605 (release/v0.47.17)
  • agr_ui PR (SCRUM-4816)

@oblodgett oblodgett requested a review from a team as a code owner March 27, 2026 20:24
@claude
Copy link
Copy Markdown

claude bot commented Mar 27, 2026

Review: Critical Bug — Field name mismatch will break expression search

The ES mapping and SearchHelper are renamed to anatomicalExpressionSlim, but the Java model classes that produce the indexed documents still use the old name anatomicalExpression:

  • SearchableItemDocument.java:50 — field is still Set<String> anatomicalExpression
  • IndexerCache.java:52 — cache map is still Map<String, Set<String>> anatomicalExpression
  • IndexerCache.java:155document.setAnatomicalExpression(...) still uses the old setter

Since these classes use Lombok @Getter/@Setter with no @JsonProperty annotation, Jackson will serialize the field as "anatomicalExpression" in ES documents. But the mapping now defines the field as "anatomicalExpressionSlim", and search queries/facets/highlights all reference "anatomicalExpressionSlim".

Result: After reindexing, anatomical expression data will be indexed under the old unmapped field name, while all search/facet/highlight logic looks for the new name. Expression facets and search hits for anatomical terms will return empty.

Fix: Rename the field in SearchableItemDocument and IndexerCache to anatomicalExpressionSlim (or add @JsonProperty("anatomicalExpressionSlim") annotations). The two Groovy test files that reference anatomicalExpression should also be updated:

  • GeneDocumentIntegrationSpec.groovy:79
  • CategoriesAndFieldsIntegrationForLaterSpec.groovy:54

@oblodgett oblodgett merged commit aa8f838 into stage Mar 30, 2026
5 checks passed
@oblodgett oblodgett deleted the SCRUM-4816 branch March 30, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants