We have an experimental api now for setting cardinality limit via the view api (see: #5312 & #5328). This issue is for tracking making this a stable feature.