سؤال

I am using solr to do a search. As result I get back a set of fields. One of the fields is "domains". The domain field is a many to many relationship in my database, so my docs contain an array of "domains" the are linked to.

What I want to do is, for each domain in the resultset, count how many times this "domain term" is found in the global result set.

How should I do this ?

هل كانت مفيدة؟

المحلول

You need to look at the Field collapsing feature.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top