You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.1 version.
Session: Querying: How to perform a multifaceted search?
Multiple Facet queries can be executed at once using
multiFacetedSearch method from
advanced session operations.
public FacetResults multiFacetedSearch(FacetQuery... queries);
|queries||params FacetQuery||Array of FacetQueries that will be executed on server.|
|FacetResult||Array of FacetResults. Each matching its FacetQuery position from
FacetQuery facetQuery1 = session.query(Camera.class) .toFacetQuery("facets/CameraFacets1"); FacetQuery facetQuery2 = session.query(Camera.class) .toFacetQuery("facets/CameraFacets2"); FacetResults results = session.advanced().multiFacetedSearch(facetQuery1, facetQuery2); FacetResults facetResults1 = results; FacetResults facetResults2 = results;