Changeset 6465


Ignore:
Timestamp:
08/17/15 10:13:26 (9 years ago)
Author:
davor.ostojic@oeaw.ac.at
Message:

to prevent sending additional solr req when selecting values for all facets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.3-oeaw/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/solr/impl/SolrFacetFieldsService.java

    r6461 r6465  
    4747    @Override
    4848    public List<FacetField> getFacetFields(QueryFacetsSelection selection, List<String> facets, int valueLimit) {
    49         //if excluded facet exists and it is equal to selected fire additional query
    50         return (selection.getExcludedFacet() != null && selection.getExcludedFacet().equals(facets.get(0)))?
     49        //if excluded facet exists and it is equal to selected fire additional query and do it only for single facet queries
     50        return (selection.getExcludedFacet() != null && facets.size() == 1 && selection.getExcludedFacet().equals(facets.get(0)))?
    5151        searchResultsDao.getFacets(queryFatory.createFacetQuery(selection, facets, valueLimit),
    5252                        queryFatory.createExludedFacetQuery(selection, selection.getExcludedFacet(), valueLimit)) :
Note: See TracChangeset for help on using the changeset viewer.