Google Custom Search Facets

Google Custom Search Facets

Rate this article

Share this article

Read google custom search facets for more information.


Even after you’ve assembled the result set for your search engine and tweaked the rankings, your users might still type queries that are too broad. For example, if users search for a health condition, it is not clear what kind of information they are looking for. Are they looking for information about symptoms, treatments, or risk factors? However, if they can select refinements or categories of search results, they can narrow their searches and get to the answers quickly.

Google Custom Search Facetsgoogle custom search facets

Refinements are labels that you apply to sites to categorize them. The refinement labels you create appear as links at the top of your search results pages. When a user clicks one of the refinement links, sites that you have tagged with the refinement label is—depending on how you have defined the label—either searched exclusively or promoted above other results. You can even append your users’ queries with additional search terms to help them retrieve more targeted results or redirect them to a different page.

You can create refinement labels and tag sites with them in the Refinements tab of the control panel, but you can have greater control over the ranking if you are using the Custom Search XML annotations file. As with the search engine labels, you define refinement labels in the context file and apply them to sites in the annotations file.

As the following example shows, refinement labels are defined using Facet elements within the Context section.

<CustomSearchEngine>   <Title>Universities</Title>     <Context>       <Facet>         <FacetItem title="Lectures">            <Label name="lectures" mode="BOOST" weight="0.8">               <Rewrite>lecture OR lectures</Rewrite>            </Label>         </FacetItem>       </Facet>       <Facet>         <FacetItem title="Assignments">           <Label name="assignments" mode="BOOST" weight="0.8">             <Rewrite>homework OR assignment OR assignments</Rewrite>           </Label>         </FacetItem>      </Facet>      <Facet>        <FacetItem title="Reference">          <Label name="reference" mode="FILTER">             <IgnoreBackgroundLabels>true</IgnoreBackgroundLabels>          </Label>        </FacetItem>      </Facet>      <Facet>         <FacetItem title="Papers">           <Label name="papers" mode="FILTER"/>           <Redirect url="$q"/>         </FacetItem>       </Facet>       <BackgroundLabels>         <Label name="_cse_omuauf_lfve" mode="FILTER"/>         <Label name="_cse_exclude_omuauf_lfve" mode="ELIMINATE"/>       </BackgroundLabels>     </Context>   </CustomSearchEngine>


The Facet element has the following structure:

Each Facet elements can have up to four FacetItem child elements. You can create as many refinement labels as you want. 

Get Faceted Search for your Website at $9

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.
You may also like