The bulk loader and the incremental loader call ATG system services to generate the XHTML representations of the data. After each XHTML document is generated, the loaders use a document submitter (created automatically) to submit the document content to ATG Search.
To enable you to optimize and debug your XHTML output, the atg.repository.search.indexing.submitter
package includes ConsoleDocumentSubmitter
and FileDocumentSubmitter
classes that can direct the XHTML to the console or to files, rather than to ATG Search. These classes allow you to view the output without actually initiating an indexing job. To direct the output to the console:
Set the
documentSubmitter
property of yourIndexingOutputConfig
to a component of classConsoleDocumentSubmitter
. (This step is optional. If the property is not set, the output will be directed to the console by default.)Access the page for the
IndexingOutputConfig
component in the Component Browser of the Dynamo Admin UI.In the Methods section, click the link for
bulkLoad
(to run the bulk loader) orprocessQueuedUpdates
(to run the incremental loader).At the confirmation prompt, click Yes to invoke the method.
To direct the XHTML output to files instead of the console, in Step 1 set the documentSubmitter
property to a component of class FileDocumentSubmitter
. This class creates a separate file for each XHTML document generated. The location and names of the files are automatically determined based on the following properties:
baseDirectory
The pathname of the directory to write the files to.
filePrefix
The string to prepend to the name of each generated file. Default is the empty string.
fileSuffix
The string to append to the name of each generated file. Default is “.xhtml
”.
nameByRepositoryId
Iftrue
, each filename will be based on the repository ID of the item the file represents. Iffalse
(the default), files are named0.xhtml
,1.xhtml
, etc.
overwriteExistingFiles
Iftrue
, if the generated filename matches an existing file, the existing file will be overwritten by the new file. Iffalse
(the default), the new file will be given a different name to avoid overwriting the existing file.
After you create these XHTML output files, look them over carefully for potential improvements. For example, if you see redundant values for certain properties, you can specify the unique
filter in the XML definition file for those properties (see the PropertyValuesFilter section). Or if you notice that certain text properties have values that users are unlikely to search for, you can remove those properties from the definition file.
Viewing the Output in the Component Browser
You can view the XHTML output for a single document-level repository item (and its child items) in the Component Browser of the ATG Dynamo Admin UI. To do this, access the page for the IndexingOutputConfig
component in the Component Browser. The page will include a Test Document Generation section that looks similar to this:
Fill in the repository ID, and click Generate. The page will display the XHTML output. The output is not directed to ATG Search.