Elements per Bucket

Chapter 4, lectures 4 and 5 the teacher show how to define how many buckets use in $bucket and $bucketAuto. If I want to choose how many elements per bucket insted how many buckets how can i do this?

I have an addition to this question that I would like some clarification on. Lets say that I want to define a bucket and I want my boundries to be grouped alphabetically. Say a - f, g - l, m-r, s-z. How would I accomplish this?

Obviously, the field would be a string field… Would I just sort the field and then use $bucketAuto with 4 buckets?

2 Likes