How are you getting the word counts? Do you have a field in the doc where you
store it? If so, either use “interval facets” or “facet queries”, either one
should give you what you want.
Your particular example would also work with “range faceting” since the buckets
are identically sized.
See:
How can I group my Solr query results using a numeric field into x buckets,
where the bucket start and end values are determined when the query is run?
For example, if I want to count and group documents into 5 buckets by a
wordCount field, the results should be:
250-500 words: 3438 results
500-75
How can I group my Solr query results using a numeric field into x buckets,
where the bucket start and end values are determined when the query is run?
For example, if I want to count and group documents into 5 buckets by a
wordCount field, the results should be:
250-500 words: 3438 results
500-75