Skip to content

Meta: facet-count correctness & coherence (counts beyond the single-filter cube) #305

@rdhyee

Description

@rdhyee

Why this issue exists

Facet-count correctness keeps surfacing as separate bug reports (#296, #304, and others from collaborators), but they share one root cause and one fix lever. This is the higher-level tracker so the team can see the whole picture in one place and not re-diagnose each report from scratch.

It effectively succeeds #234 (now closed) for the counts dimension: #234's "coherent filter semantics across all surfaces" roadmap shipped, but the count-coherence frontier outlived it.

The through-line (plain English)

The Explorer can show correct, cross-filtered facet counts instantly for exactly one active filter — that case is served by a precomputed lookup ("the cube", #290/#298). Everything beyond one filter currently falls off that fast path:

So the mental model is: the single-filter cube is the spine; the frontier is "counts when more than one thing is true at once."

Crucially, the map/point filtering is correct in all these cases — it's specifically the count numbers that mislead. And zooming in makes counts correct (the live membership path cross-filters by all active dims). The breakage is specific to the global/zoomed-out view.

The shared fix lever

We already shipped the tool to fix this: the sample_facet_masks bitmask (#299) computes multi-filter results in one ~6M-row columnar scan, instead of the ~39M-row sample_facet_membership scan that originally forced the global multi-filter count path to be stubbed to the baseline. The plan is to un-stub the global multi-filter count path on top of the masks.

Children / related

What "done" looks like

cc @ekansa @akthom — filing this so the count issues you've reported have one coordinating home; the specific bug stays in #304.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestexplorerInteractive Explorer featuresneeds-discussionRequires team input before implementing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions