Skip to content

Filter variant_summary to only include records with null allele in ge…#1532

Merged
VarunReddy1111 merged 3 commits intostagefrom
SCRUM-4443
Mar 23, 2026
Merged

Filter variant_summary to only include records with null allele in ge…#1532
VarunReddy1111 merged 3 commits intostagefrom
SCRUM-4443

Conversation

@VarunReddy1111
Copy link
Copy Markdown
Contributor

…tAllelesByGene

When querying alleles by gene, variant_summary documents should only be returned when they have no associated allele object. This prevents duplicate variant data that is already represented through allele_summary.

…tAllelesByGene

When querying alleles by gene, variant_summary documents should only be
returned when they have no associated allele object. This prevents
duplicate variant data that is already represented through allele_summary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@VarunReddy1111 VarunReddy1111 requested a review from a team as a code owner March 23, 2026 15:41
@claude
Copy link
Copy Markdown

claude bot commented Mar 23, 2026

Code Review

The change looks correct. The Elasticsearch query logic is sound:

  • The new BoolQueryBuilder (variantWithNullAllele) correctly combines a must on category.keyword = variant_summary with a mustNot on existsQuery("allele"), so only variant summaries without an allele field are returned.
  • This nested bool query is properly placed as a should clause alongside the allele_summary term query, preserving the OR semantics (match allele summaries OR variant summaries with null allele).
  • The shouldQueryBuilder only contains should clauses (no must/filter), so Elasticsearch defaults minimum_should_match to 1 — at least one branch must match. This is correct.

No issues found.

@VarunReddy1111 VarunReddy1111 disabled auto-merge March 23, 2026 15:43
@VarunReddy1111 VarunReddy1111 merged commit d90c284 into stage Mar 23, 2026
5 checks passed
@VarunReddy1111 VarunReddy1111 deleted the SCRUM-4443 branch March 23, 2026 15:48
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