Product DocsMenu

About the Liferay Connector Mapping File

The Liferay connector mapping file determines exactly which Liferay entities are indexed, what metadata is retrieved, and where this information is added in the Coveo unified index. The default mapping file ([CES_Path]\bin\Coveo.CES.CustomCrawlers.Liferay.DefaultMappingFile.xml) is automatically used when no mapping file is specified in the source.

The default mapping file specifies to index the following Liferay default entity types:

  • Attachment

  • BlogEntry

  • CalendarEvent

  • Comment

  • DocumentLibraryFile

  • MessageBoardMessage

  • User

  • WebContentLocalized

  • WikiPage

The mapping file is an XML file that contains various sections and subsections. The root element is <LiferayMapping>. It contains various <Mapping> nodes, each defining one entity type to be indexed with the corresponding metadata.

Example: The following mapping element specifies to index the BlogEntry entity type.
<Mapping type="BlogEntry">
    <Fields>
      <Title>%[title]</Title>
      <Body>%[content]</Body>
      <ClickableUri>%[coveo_url]</ClickableUri>
      <ModifiedDateUtc>%[coveo_lastModifiedDate]</ModifiedDateUtc>
      <CustomFields>
        <CustomField name="sysauthor">%[userName]</CustomField>
        <CustomField name="sysparents">%[coveo_breadcrumbs]</CustomField>
      </CustomFields>
    </Fields>
  </Mapping>  

A <Mapping type=“Default”> element applies to all retrieved items that do not have their own specific mapping element. Such an element exists but is commented out in the default mapping file.

Note: You can create and use a custom mapping file to fine-tune the Liferay indexed content (see Customizing the Liferay Connector Mapping File).

People who viewed this topic also viewed