The Endeca Sitemap Generator is included in the Tools and Frameworks installation. It is found in the following location:

ToolsAndFrameworks/version/sitemap_generator/

The sitemap generator is configured through files stored in the conf subdirectory of the sitemap_generator directory. To create the category sitemap pages for Commerce Reference Store, you need to set up three separate configurations, one for each Commerce Reference Store site. To create these configurations, perform the following steps in the sitemap_generator directory:

Creating the Sitemap Generator Configurations

To create the three Endeca Sitemap Generator configurations:

  1. Copy the store.war/WEB-INF/endeca-seo-url-config.xml file into the three configuration directories. For example, the file for the CRS Home sitemap generator configuration would be:

    conf_homeus/endeca-seo-url-config.xml

  2. Edit the conf.xml file in each configuration directory and set the <URL_FORMAT_FILE> tag to endeca-seo-url-config.xml:

    <URL_FORMAT_FILE>endeca-seo-url-config.xml</URL_FORMAT_FILE>

  3. In the conf.xml files, edit the <INDEX_FILE> tag to specify the name and location where the sitemap index file should be written. (The location will be used for other sitemap files as well.) For example, in the conf_storede/conf.xml file, set this tag to:

    <INDEX_FILE>../sitemap_storede/index.html</INDEX_FILE>

  4. In the conf.xml files, configure the <MDEX_ENGINES> element:

    For example, if the host name is myhost.example.com and the port number is 15000, the MDEX_ENGINES element in the conf_homeus/conf.xml file would be:

    <MDEX_ENGINES>
      <ENGINE>
          <HOST>myhost.example.com</HOST>
          <PORT>15000</PORT>
          <ROOT_QUERY><![CDATA[N=0&Nr=product.siteId:homeSite]]></ROOT_QUERY>
          <ROLLUP_KEY>product.repositoryId</ROLLUP_KEY>
      </ENGINE>
    </MDEX_ENGINES>

  5. In the conf.xml files, edit the <QUERY_FIELD_LIST> element to remove the product.name <QUERY_FIELD> entry and change the product.brand.name entry to product.brand. The result should be:

    <QUERY_FIELD_LIST>
    <QUERY_FIELD>product.category</QUERY_FIELD>
    <QUERY_FIELD>product.brand</QUERY_FIELD>
    </QUERY_FIELD_LIST>

  6. In the conf.xml files, edit the <NAVIGATION_PAGE_SPEC> elements to change the product.brand.name <DIMENSION_NAME> entries to product.brand and change all of the FULL_HIERARCHY attribute values to True. The result should be:

    <NAVIGATION_PAGE_SPEC_LIST>
    <NAVIGATION_PAGE_SPEC>
    <DIMENSION_NAME FULL_HIERARCHY="True">product.category</DIMENSION_NAME>
    </NAVIGATION_PAGE_SPEC>
    <NAVIGATION_PAGE_SPEC>
    <DIMENSION_NAME FULL_HIERARCHY="True">product.brand</DIMENSION_NAME>
    </NAVIGATION_PAGE_SPEC>
    <NAVIGATION_PAGE_SPEC>
    DIMENSION_NAME FULL_HIERARCHY="True">product.category</DIMENSION_NAME>
    DIMENSION_NAME FULL_HIERARCHY="True">product.brand</DIMENSION_NAME>
    </NAVIGATION_PAGE_SPEC>
    </NAVIGATION_PAGE_SPEC_LIST>

  7. Edit the xml_template.xml file in each configuration directory and update the <loc> tags to reflect your production machine details (machine name, listen port, and context path). For example, if the machine name is myhost.example.com and the listen port is 7001, the settings in the conf_homeus/xml_template.xml file would be:

    <DETAIL_LINK><![CDATA[
    <url>
      <loc>http://myhost.example.com:7001/crs/homeus/detail**FORMATTED_URL\|XmlEscape**</loc>
      <lastmod>*TIMESTAMP*</lastmod>
    </url>
    ]]></DETAIL_LINK>

    <NAVIGATION_LINK><![CDATA[
    <url>
      <loc>http://myhost.example.com:7001/crs/homeus/browse**FORMATTED_URL\|XmlEscape**/</loc>
      <lastmod>*TIMESTAMP*</lastmod>
    </url>
    ]]></NAVIGATION_LINK>

    <SEARCH_TERM_LINK><![CDATA[
    <url>
      <loc>http://myhost.example.com:7001/crs/homeus/browse**FORMATTED_URL\|XmlEscape**</loc>
      <lastmod>*TIMESTAMP*</lastmod>
    </url>
    ]]></SEARCH_TERM_LINK>

    <STATIC_PAGE_LINK><![CDATA[
    <url>
      <loc>http://myhost.example.com:7001/crs/homeus/**STATIC_PAGE\|XmlEscape**</loc>
      <lastmod>*TIMESTAMP*</lastmod>
    </url>
    ]]></STATIC_PAGE_LINK>

  8. Edit the searchterms.xml file in each configuration directory and set the <MDEXHOST> and <MDEXPORT> tags to the host name and port number of the machine the MDEX is running on. In addition, remove the existing <URL> tags from the file. For example, if the machine name is myhost.example.com and the port number is 15000, the contents of each searchterms.xml file would be:

    <URLS>
    <MDEXHOST>myhost.example.com</MDEXHOST>
    <MDEXPORT>15000</MDEXPORT>
    <DEFAULTQUERY><![CDATA[N=0]]></DEFAULTQUERY>
    </URLS>

Generating and Combining the ATG and Endeca Sitemap Files

Once you’ve configured everything, you can create you sitemap files by performing the following steps:

  1. Run the ATG SitemapGeneratorService and SitemapWriterService components, as discussed in the ATG Sitemap Generator Components section.

  2. Go to the Endeca sitemap_generator/bin directory and run the RunSitemapGen.sh (Unix) or RunSitemapGen.bat (Windows) command three times, each time specifying the conf.xml file for a different configuration. For example, on Windows the three commands would be:

    RunSitemapGen.bat ..\conf_storeus\conf.xml
    RunSitemapGen.bat ..\conf_storede\conf.xml
    RunSitemapGen.bat ..\conf_homeus\conf.xml

  3. Copy the navigation0.xml files that the generator creates in the Endeca sitemap directories to the Commerce Reference Store store.war directory. Rename each file to reflect the site it corresponds to. For example, copy the conf_storeus/navigation0.xml file to store.war/navigation_storeus.xml.

  4. Add entries for these files to the siteindex.xml file created by the ATG SitemapIndexGenerator component. For example:

    <sitemap>
      <loc>http://www.example.com/navigation_storeus.xml</loc>
    </sitemap>

Note that you need to perform these steps each time you want to regenerate your sitemap files. You can simplify this by writing a script to automate all or part of the process.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices