Suppose you've defined PageMaps with a "pagetype" attribute as in this example:
<PageMap> <DataObject type="document"> <Attribute name="pagetype"> Product Details </Attribute> </DataObject> </PageMap>
You can create a refinement with a "rewrite" (query addition) using the "more:" operator to match an attribute value:
more:pagemap:document-pagetype:Product*Details
In that example the asterisk allows the single "more:" operator to match the two words in the attribute value.
Of course alternatively you could omit the space in the attribute value in the pagemap (e.g. "ProductDetails") in which case you wouldn't need to use the asterisk syntax in the query.
The 'asterisk syntax' might not yet be described in documentation, but hxu-cse mentioned it in another discussion - groups.google.com ![]()
# Documentation
In the Structured Search documentation titled "Filtering and sorting search results", see the "Web search" section's "Filter by Attribute" subsection: - code.google.com
For information on how to provide structured data (PageMaps etc.) see code.google.com ![]()
# Pagemap Examples
Below is an example in which we add two <DataObject> tags - one for a Adding Thumbnails, and on for marking up a page with two Refinements.
Let's take a look at sme Pagemap Examples. The example below is taken from this discussion: productforums.google.com ![]()
<PageMap> <DataObject type="thumbnail"> <Attribute name="src" value="http://images6.cpcache.com/product/17930066_150x150_Front.jpg"/> <Attribute name="class" value="search_thumb"/> <Attribute name="width" value="150"/> <Attribute name="height" value="150"/> <Attribute name="alt" value=" ~ Peace On Earth Value T-Shirt" /> </DataObject> <DataObject type="document"> <Attribute name="pagetype"> Products </Attribute> <Attribute name="department"> Men's Apparel </Attribute> </DataObject> </PageMap>
From this we can created refinements in the control panel, respectively with the optional search words:
more:pagemap:document-pagetype:Products more:pagemap:document-department:Men's*Wear
This generates the following FacetItems in the context XML:
<FacetItem> <Label name="products" mode="BOOST"> <Rewrite> more:pagemap:document-pagetype:Products </Rewrite> </Label> <Title>Products</Title> </FacetItem> <FacetItem> <Label name="men_s_wear" mode="BOOST"> <Rewrite> more:pagemap:document-department:Men's*Wear </Rewrite> </Label> <Title>Men's Wear</Title> </FacetItem>
You can then download the context XML file from the Advanced page, re-sorted the FacetItems so they'd appear in the order you want on the CSE and uploaded the new XML file via the Advanced page.
Here is how you build and submit a google Site Map: