}
return true;
}
private void appendFacetingOnFields(SolrQuery solrQuery, FacetQuery query) {
FacetOptions facetOptions = query.getFacetOptions();
if (facetOptions.getPageable().getPageNumber() > 0) {
solrQuery.set(FacetParams.FACET_OFFSET, facetOptions.getPageable().getOffset());
}
solrQuery.addFacetField(convertFieldListToStringArray(facetOptions.getFacetOnFields()));
if (facetOptions.hasFacetPrefix()) {
solrQuery.setFacetPrefix(facetOptions.getFacetPrefix());
}
for (FieldWithFacetParameters parametrizedField : facetOptions.getFieldsWithParameters()) {
addPerFieldFacetParameters(solrQuery, parametrizedField);
if (parametrizedField.getSort() != null && FacetOptions.FacetSort.INDEX.equals(parametrizedField.getSort())) {
addFieldSpecificParameterToSolrQuery(solrQuery, parametrizedField, new FacetParameter(FacetParams.FACET_SORT,
FacetParams.FACET_SORT_INDEX));
}