}
ArrayList<FacetPivotFieldEntry> pivotFieldEntries = new ArrayList<FacetPivotFieldEntry>();
for (PivotField pivotField : pivotResult) {
SimpleFacetPivotEntry pivotFieldEntry = new SimpleFacetPivotEntry(new SimpleField(pivotField.getField()),
String.valueOf(pivotField.getValue()), pivotField.getCount());
List<PivotField> pivot = pivotField.getPivot();
if (pivot != null) {
pivotFieldEntry.setPivot(convertPivotResult(pivot));
}
pivotFieldEntries.add(pivotFieldEntry);
}