The CommerceFacetSearchDroplet
component is an instance of the FacetSearchDroplet
class. It takes the FacetTrail
object and various ATG Search query attributes as inputs, and passes these to the CommerceFacetSearchService
. The CommerceFacetSearchService
constructs a search query that specifies:
constraints created based on the facets and categories in the facet trail
a refinement configuration file, which the
CommerceFacetSearchService
determines based on the entries in the facet trailthe search refinement query attributes from the
CommerceFacetSearchDroplet
the pagination query attributes from the
CommerceFacetSearchDroplet
The CommerceFacetSearchService
passes the query to the ESSearchService
, which sends the query to ATG Search and receives back a Search Results
object. The CommerceFacetSearchService
converts this object to a FacetSearchResponse
object, which the CommerceFacetSearchDroplet
outputs.
The page developer can then use servlet beans such as ForEach
to iterate through this object and display the resulting facets and selections and products returned. The selection ranges or values can be displayed as hyperlinks which, when clicked, pass the new facet trail String and modification instructions as query parameters to the linked page.