Skip to content

support multiple hierarchies in facets builder #526

@bilalesi

Description

@bilalesi

Environment

E.g. dev, staging, prod

Operating system & resolution

E.g. Mac 14" (if possible, include also the resolution), Linux, etc

Browser & version

E.g. chrome, safari (including version)

Description

currently, the facets builder logic in WithFacets class and _get_facets function doesn't account for multiple brain region hierarchies when filtering data, the InBrainRegionQuery dependency supports filtering by a specific within_brain_region_hierarchy_id, but when facets are built, they aggregate results across all hierarchies without respecting the hierarchy context specified in the query parameters.

To Reproduce

Expected behavior

  • apply hierarchy filtering in facet queries when hierarchy_id is provided

Screenshots

If applicable, add screenshots to help explain your problem

Additional context

Add any other context about the problem here

Acceptance criteria

  • Facets respect within_brain_region_hierarchy_id when provided
  • Facet counts only include entities from the specified hierarchy

Right panel fields

Assignee

Will be added by default (the Product Owner)

Labels

E.g. You can add 'planning' (for QA discussion), 'up next?' (for resource request), or other as applicable

Type

Bug

Projects

Select 'OBI 2025-' project (plus others as relevant)
Priority: P1
Time estimate: In days

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions