user2245564
user2245564

Reputation: 17

How I can get number of group from response?

I am using apache solr 4. I am using query with group=true.

My query params is "group=true&group.field=company_id"

How I can get number of group? In solr response only number of all rows and number of rows in every group. Thank you.

Upvotes: 0

Views: 95

Answers (1)

Srikanth Venugopalan
Srikanth Venugopalan

Reputation: 9049

You can set the ngroups parameter to true to get the count of group

Add group.ngroups=true to your querystring to achieve this.

More details in this documentation.

Upvotes: 1

Related Questions