0

I have the same problem as in Views sorting by number of values in field". I would really like to try the solution that is given.

How can I enable aggregation in the view settings? I can't find it anywhere.

The following is a screenshot of the view panel. Is there any other name for "aggregation"?

screenshot

3
  • 2
    Looks like a search API view? Those don't support aggregation, probably because of the pluggable backend
    – Clive
    Feb 3 '15 at 15:14
  • It is! So do you know some other solution? What I want to do is this: "I have a content type with an text field with unlimited number of values.I have a view for that content type and I want to sort it by number of values in that field." Thanks
    – Drii7
    Feb 3 '15 at 15:17
  • Don't use Search API for the view, use a regular content type view, and then you'll have aggregation available. Feb 4 '15 at 11:45
0

Your view appears to be a search API view, for which "aggregation" is not supported. Which is also why the "Use aggregation" option is not visible (credits: comment to question Clive).

A possible solution (work around?) to make the aggregation option available, is to NOT use the Search API for your view, and instead use a regular content type view (credits: comment to question Alfred Armstrong).

PS: Comments may get deleted, for all sorts of reasons, which is why I included them in this answer ...

0

Pretty old question now, but posting in case anyone comes here looking to do the same thing in D8 with a Search API view.

With D8 version of Search API, when making the index you can add a General field Aggregated field.

General fields list showing the Aggregated Field available

In the setting of this field, simply select Count as the aggregation type and select the field you want to count.

Aggregated field settings showing the Count option

Remember to set the type to Integer when looking at the list of added fields. General Aggregated Field in Search API Index

This will provide a new field in the search View that will display a count of the selected field for that row.

Search API View field of the aggregated count field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.