Product DocsMenu

Creating a Custom Google Sites Connector Mapping File

The Google Sites connector comes with a default mapping file (CES 7.0.7183+ (November 2014)) which allows to index the retrieved Google Sites default metadata. However, when you want to modify the default behavior of the Google Sites connector, creating a custom mapping file is required.

The following table presents Google Sites metadata retrieved by the connector. Metadata prefixed with coveo_ are extra metadata created by the Coveo connector.

Note: CES 7.0.7183+ (November 2014) Metadata prefixed with coveo_ and other absent metadata from the default mapping file are contained in the default field set ([CES_Path]\Bin\Coveo.CES.CustomCrawlers.GoogleSites.FieldSet.xml).

Name Type Description
coveo_id String Item unique identifier
coveo_parent_id String Parent item unique identifier
coveo_domain_name String The domain name of the Google Site that contains this item.
coveo_site_name String The site name of the Google Site that contains this item.
coveo_item_type String Item type formatted ready to be displayed.
title String Item title
alternate_uri String Item alternate URI (clickable link to the page or item in Google Sites)
clickable_link String Item clickable link
is_draft Boolean Indicates if the item is in draft state or not.
kind String Item kind (item type)
folder String Item folder name (if any)
categories String Item categories (tags)
summary String Item summary
edited DateTime Item edited date and time
published DateTime Item published date and time
updated DateTime Item updated date and time
author_names String Item author names
author_emails String Item author emails
content_source String Item content source (link pointing to the attachment or web attachment)
page_name String Item page name in the URL
revision Integer Item current revision number

Note: CES 7.0.7104– (October 2014) When you want to index Google Sites metadata, you must create a custom mapping file that will be used by your Google Sites source. The mapping file specifies which Google Sites metadata will be mapped to which Coveo index custom fields.

Below is a sample Google Sites mapping file with useful mappings for Google Sites metadata.

<?xml version="1.0" encoding="utf-8" ?>
<Mappings>
 <Version>1</Version>
 <CommonMapping>
   <Fields>
     <!-- Google Sites custom fields -->
     <Field name="sitedomainname">%[coveo_domain_name]</Field>
     <Field name="siteitemtype">%[coveo_item_type]</Field>
     <Field name="sitename">%[coveo_site_name]</Field>
     <Field name="siteauthoremails">%[author_emails]</Field>
     <Field name="sitekind">%[kind]</Field>
     <Field name="sitecategories">%[categories]</Field>
   </Fields>
 </CommonMapping>
 <Mapping type="attachment">
   <Fields>
     <!-- Google Sites custom fields -->
     <Field name="sitefoldername">%[folder]</Field>
   </Fields>
 </Mapping>
 </Mapping>
 <Mapping type="listitem">
   <Title>List item added by %[author_names] at %[updated]</Title>
   <Fields>
     <Field name="sysauthor">%[author_names]</Field>
   </Fields>
 </Mapping>
 <Mapping type="page">
   <Fields>
     <Field name="sysauthor">%[author_names]</Field>
   </Fields>
 </Mapping>
 <Mapping type="website">
   <Body><![CDATA[ <html>%[title] <p>%[summary]</p></html> ]]></Body>
   <Fields>
     <Field name="sysauthor">%[author_names]</Field>
   </Fields>
 </Mapping>
 <Mapping type="webattachment">
   <Fields>
     <!-- Google Sites custom fields -->
     <Field name="sitefoldername">%[folder]</Field>
   </Fields>
 </Mapping>
</Mappings>

To create a custom Google Sites connector mapping file

  1. Copy the content of the sample mapping file.

  2. Using a text editor: 

    1. Edit the file to include the desired Google Site metadata mapping to custom index fields.

    2. Ensure that your custom mapping file respects the standard mapping file format (see Standard Mapping File Schema).

    3. Save the file.

  3. Copy your custom mapping file on the Coveo Master server in a folder accessible to CES.

    Example: Copy the mapping file to D:\CES7\Config\MyGoogleSitesMappingFile.xml

What's Next?

Consider using the sample Google Sites field set (see Google Sites Connector Deployment Overview).

Ensure that all the Coveo fields included in your mapping file are created in the index (see Adding or Modifying Custom Fields).

People who viewed this topic also viewed