m3rg
m3rg

Reputation: 688

Is multidimensional faceting possible in Solr?

It's working great for a single field but what I need is to combine multiple fields. For example; Students. Each student has age and grade data. I want to show the result like this:

age: 20
100-90 (70 students)
90-80 (120 students)
80-70 (40 students)

age: 21
100-90 (60 students)
90-80 (110 students)
80-70 (20 students)

age: 22
100-90 (70 students)
90-80 (120 students)
80-70 (40 students)

Only thing that come up to my mind is fetching age and grades as facets and searching each facet again. Like, search age 20 for grade 100-90, 90-80, 80-70.. and do the same thing for other ages. Is there an easier way to do that in Solr?

Upvotes: 1

Views: 980

Answers (2)

Fuxi
Fuxi

Reputation: 5488

Take a look at Solr Pivot faceting and watch The Many Facets of Apache Solr by Yonik Seeley. Pivot faceting is might be what you're looking for.

Upvotes: 3

Bob Yoplait
Bob Yoplait

Reputation: 2499

facet.pivot available in Solr4

Upvotes: 4

Related Questions