You can run the Sitemap Generator from the command line using RunSitemapGen.bat (on Windows) or RunSitemapGen.sh (on UNIX).

The Sitemap Generator runs using the configuration files stored in the sitemap_generator directory. To create sitemap pages for each site in an EAC application, you need to set up configurations for each site. For example, if you are creating sitemaps for a Canon and Sony site in the Discover reference application, you would make two copies of the sitemap_generator/conf directory and give the new conf directories unique names.

sitemap_generator/conf
sitemap_generator/conf_canon
sitemap_generator/conf_sony
                 

  1. Edit the conf.xml file in each site configuration directory.

    1. Specify the type of template file, html_template.xml or xml_template.xml, in the TEMPLATE_FILE element.

    2. In the MDEX engines section, specify the host and port of the machine that the MDEX engine is running on.

    3. Specify a ROOT_QUERY element that restricts the search and navigation query to the records filtered by site. You must specify a ROOT_QUERY element that matches the filter parameters specified in the filterState.xml file.

      The following example shows the filterState.xml file and the corresponding Sitemap Generator conf.xml file for a site that restricts itself to only display Canon-branded items.

      The filterState.xml file shows a configuration with a record filter that only includes records with the Canon brand.

      <Item class="com.endeca.infront.navigation.model.FilterState" xmlns="http://endeca.com/schema/xavia/2010">
       <Property name="recordFilters">
       <List>
       <String>product.brand.name:Canon</String>
       </List>
       </Property>
      </Item>
      

      The MDEX engine section of the conf.xml file has the host and port of the MDEX engine and a ROOT_QUERY element that has been updated to reflect a site restricted to the Canon brand. The ROOT_QUERY element specifies the query string for the Sitemap Generator to use when submitting the bulk export query against the specified index.

      <MDEX_ENGINES>
        <ENGINE>
            <HOST>myhost.example.com</HOST>
            <PORT>15000</PORT>
            <ROOT_QUERY><![CDATA[N=4294967266]]></ROOT_QUERY>
            <ROLLUP_KEY>product.code</ROLLUP_KEY>
        </ENGINE>
      </MDEX_ENGINES>

      See the Oracle Commerce Administrator's Guide for more information on site-based filters.

    4. Specify an output directory in the INDEX element so that it specifies the name of the site index file that the Sitemap Generator creates. This setting determines the relative path and extension for other output files for the site as well.

      For example, the index element for a Canon site could look like this:

      <INDEX_FILE>../sitemap_canon/index.xml</INDEX_FILE>

  2. Edit the template configuration files in each site configuration directory. These configuration files are named html_template.xml or xml_template.xml.

  3. If you want to add additional search terms for your sites, edit the searchterms.xml file in each site configuration directory.

  4. Go to the sitemap_generator/bin directory and run RunSitemapGen.bat (on Windows) or RunSitemapGen.sh (on UNIX) for each site, specifying the unique conf.xml for that site. For example:

    RunSitemapGen.bat ..\conf_canon\conf.xml
    RunSitemapGen.bat ..\conf_sony\conf.xml

    The output appears in the sitemap_generator/sitemap_canon and sitemap_generator/sitemap_sony folders.


Copyright © Legal Notices