Google Commerce Search Deployment Guide User Manual
Page 19
 
●
Spelling
●
Recommendations
 
Each module is enabled with the module-name.enabled parameter. Each also has another 
parameter, module-name.useGcsConfig, which when set to true, specifies that you
want to use the configuration for that module as set in the GCS Control Panel. Some modules 
also have other parameters to control the results. For more details, see the content modules 
documentation at
Each content module, when enabled, returns its content in a separate block of data within the 
result set.
 
Facets and refinements
The facets content module allows augmenting the response with facets. A facet is a histogram 
of the values of a specified property or attribute among all the products matching the search 
criteria. Facets usually appear in the left navigation bar, and allow users to refine results based 
on attributes of your items (color, size, price, and so on).
 
Enabling the facets module brings back a list of attributes, along with the values and counts 
for each of them. You can specify a list of facets to return using facets.include, or use 
facets.discover
to return the most used facets for the given query automatically. In most
cases using facets.include is the best choice because it gives you more control over the 
number of bucket values to return. But you can use both--specifying a list of facets to return 
always, and then use facets.discover to return also any other facets that might be relevant.
 
These parameters, coupled with the facet rules functionality in the control panel allow for great 
flexibility in determining which facets to display for a particular query.
 
Refinements
Once you have the facet list returned, you can use them to provide options for refining the 
search results based on those facets. 
 
A simple facet result for the color attribute might look like this (xml response):
 
<s:facet name="color" displayName="Color" type="text" count="5">
<s:bucket value="Red" count="2"/>
<s:bucket value="Green" count="1"/>
<s:bucket value="Blue" count="1"/>
</s:facet>
 
The results are easy enough to parse and display, but to make them a refinement requires 
creating a URL that takes the facet name, type and value into account. Refinements are done 
using the restrictBy parameter. So to refine by color and return only Red items in this case, 
we would construct a parameter like this: &restrictBy=color(text)=Red
 
You can also add more facets to the restrictBy parameter to further narrow your search. 
There are two ways to do this:
 
19