Example usage for org.springframework.data.solr.core.query FacetOptions getFacetOnPivots

List of usage examples for org.springframework.data.solr.core.query FacetOptions getFacetOnPivots

Introduction

In this page you can find the example usage for org.springframework.data.solr.core.query FacetOptions getFacetOnPivots.

Prototype

public final List<PivotField> getFacetOnPivots() 

Source Link

Document

Get the list of pivot Fields to face on

Usage

From source file:org.springframework.data.solr.core.DefaultQueryParser.java

private void appendFacetingOnPivot(SolrQuery solrQuery, FacetQuery query) {
    if (VersionUtil.isSolr3XAvailable()) {
        throw new UnsupportedOperationException(
                "Pivot Facets are not available for solr version lower than 4.x - Please check your depdendencies.");
    }//  www.ja v a 2  s  .  c o  m

    FacetOptions facetOptions = query.getFacetOptions();
    String[] pivotFields = convertFieldListToStringArray(facetOptions.getFacetOnPivots());
    solrQuery.addFacetPivotField(pivotFields);
}