Skip to content

SCRUM-2758 Use taxon.species.fullName for species filtering#1545

Merged
oblodgett merged 3 commits intostagefrom
SCRUM-2758
Apr 1, 2026
Merged

SCRUM-2758 Use taxon.species.fullName for species filtering#1545
oblodgett merged 3 commits intostagefrom
SCRUM-2758

Conversation

@oblodgett
Copy link
Copy Markdown
Member

Summary

  • Remove S288C workaround (Saccharomyces cerevisiae -> S288C conversion) from disease and interaction controllers
  • Switch all species filter/sort/aggregation fields from taxon.name.keyword to taxon.species.fullName.keyword
  • Add explicit ES mappings for the new field paths in all document types

Depends on: alliance-genome/agr_curation#2617 (curation library must be released first, then bump curation.version in pom.xml)

Test plan

  • Bump curation version after v0.47.23 release
  • Deploy to stage and run indexer
  • Verify species filters work on disease, interaction, expression, and transgenic allele detail pages
  • Verify yeast shows as "Saccharomyces cerevisiae" (not S288C) in species filter dropdowns

Remove S288C workaround (Saccharomyces cerevisiae -> S288C conversion)
and switch all species filter/sort/aggregation fields from
taxon.name.keyword to taxon.species.fullName.keyword. Add explicit
ES mappings for the new field paths in dynamic:false sections.
@oblodgett oblodgett requested a review from a team as a code owner April 1, 2026 10:45
@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

Code Review

Changes look correct. This PR consistently migrates species filtering/sorting from taxon.name to taxon.species.fullName across all controllers, ES services, and the index mapping. Key observations:

  1. Saccharomyces cerevisiae workaround removed — The hardcoded "Saccharomyces cerevisiae" → "Saccharomyces cerevisiae S288C" translation in DiseaseController, GeneController (genetic + molecular interactions, both list and download endpoints) is cleanly replaced by using species.fullName directly. This is the right fix assuming the underlying data now has the canonical species name in species.fullName.

  2. ES mapping additions — New taxon.species.fullName field mappings are added in Mapping.java for all relevant document types (disease annotations, interactions, expression, transgenic alleles). The old taxon.name mappings are preserved, avoiding a breaking index change.

  3. Minor pre-existing issue (not introduced by this PR): In DiseaseController.java around lines 88-90, the species filter is added twice with the same key subject.taxon.species.fullName.keyword. This duplication existed before this PR (was subject.taxon.name.keyword twice) — not a regression, but worth noting for a future cleanup.

  4. Expression filter field gained .keyword suffix — The expression species filter changed from ...taxon.name (text field) to ...taxon.species.fullName.keyword (keyword sub-field). This is actually more correct for exact-match filtering and consistent with other filter fields. Just confirm the frontend sends exact species names for this filter.

No bugs, no security issues, no missing index mappings. LGTM.

@oblodgett oblodgett merged commit 5618b26 into stage Apr 1, 2026
5 checks passed
@oblodgett oblodgett deleted the SCRUM-2758 branch April 1, 2026 12:03
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.

1 participant