ezsystems/ezfind — pull request #52 by lafka (2012-06-07 12:41:37+00:00)
Title: Add support for field collapsing

Add a new parameter ``group`` that accepts a hashmap of fields as described in SOLR field collapsing documentation.

This still probably lacks alot of functionality but can be a base for further development.

### Example:

```smarty

{def $search_data = fetch(
'ezfind', 'search', hash(
'query', '*:*',
'class_id', 'artwork',
'facet', array(
hash(
'field', 'artwork/medium',
)
),
'group', hash(
'field', 'artwork/artist',
'limit', 1,
'main', 'true',
'truncate', 'true',
),
'query_handler', 'simplestandard'
)
)
}

{def $cssclass = "menu"}
{foreach $search_data['SearchExtras'].facet_fields.0.nameList as $v}

{$v} ({$search_data['SearchExtras'].facet_fields.0.countList[$v]})

{/foreach}
{undef $cssclass}

```