Changeset 6461


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

to prevent sending additional solr req for rest of the 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

    r6456 r6461  
    4747    @Override
    4848    public List<FacetField> getFacetFields(QueryFacetsSelection selection, List<String> facets, int valueLimit) {
    49         return (selection.getExcludedFacet() == null)?
    50         searchResultsDao.getFacets(queryFatory.createFacetQuery(selection, facets, 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)))?
    5151        searchResultsDao.getFacets(queryFatory.createFacetQuery(selection, facets, valueLimit),
    52                         queryFatory.createExludedFacetQuery(selection, selection.getExcludedFacet(), valueLimit));
     52                        queryFatory.createExludedFacetQuery(selection, selection.getExcludedFacet(), valueLimit)) :
     53        searchResultsDao.getFacets(queryFatory.createFacetQuery(selection, facets, valueLimit));
    5354    }
    5455
Note: See TracChangeset for help on using the changeset viewer.