Sha256: 8b4f28651bdb8a897b634fb9fb62c288aab39d476887e958a67fae55ad15ddfb

Contents?: true

Size: 702 Bytes

Versions: 5

Compression:

Stored size: 702 Bytes

Contents

#**
 *  Display facets based on field values
 *  e.g.: fields specified by &facet.field=
 *#

#if($response.facetFields)
  <h2 #annTitle("Facets generated by adding &facet.field= to the request")>
    Field Facets
  </h2>
  #foreach($field in $response.facetFields)
    ## Hide facets without value
    #if($field.values.size() > 0)
      <span class="facet-field">$field.name</span>
      <ul>
        #foreach($facet in $field.values)
          <li>
            <a href="#url_for_facet_filter($field.name, $facet.name)">$facet.name</a> ($facet.count)
          </li>
        #end
      </ul>
    #end  ## end if > 0
  #end    ## end for each facet field
#end      ## end if response has facet fields

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_solr_client-0.2.1 solr_sample_core/conf/velocity/facet_fields.vm
simple_solr_client-0.2.0 solr_sample_core/conf/velocity/facet_fields.vm
simple_solr_client-0.1.2 solr_sample_core/conf/velocity/facet_fields.vm
simple_solr_client-0.1.1 solr_sample_core/conf/velocity/facet_fields.vm
simple_solr_client-0.1.0 solr_sample_core/conf/velocity/facet_fields.vm