Skip to main content

GEO_HISTOGRAM_BUCKET_LEVEL

Constant GEO_HISTOGRAM_BUCKET_LEVEL 

Source
pub const GEO_HISTOGRAM_BUCKET_LEVEL: u8 = 11;
Expand description

Bucket-grid level of the geo cell-count histogram: every posting counts into its level-11 ancestor bucket (or, for postings coarser than 11, into the histogram’s coarse side — see GEO_HISTOGRAM_COARSE_FLOOR_LEVEL).

Level 11 is 6 × 4^11 ≈ 25.2M cells (~20 km² average), small enough that per-bucket densities track real-world spatial skew, and its dense index (face ‖ 22 Hilbert bits = 25 bits) fits a u32 key with room for levels up to 14. This is a FIXED grid, decoupled from the ingest coverer’s min_level / max_level: postings map onto it by pure bit-twiddling on the u64 cell id — no S2 library, so the O partition’s stats collector can run it (the partition stays S2-blind by contract).