Configuration Files (Aspire 2)

Jump to: navigation, search

For Information on Aspire 3.1 Click Here

Aspire 2.0 switched the configuration from a database oriented schema used in previous versions of Aspire, to an xml file oriented schema. Every time a content source is created from the Management user interface a set of files are created, each of which contain a certain piece of configuration for the content source.

Content Source Configuration

The configuration of a content source consists of four xml files that are located in the configuration folder:


For every new content source configured, a new folder is created in the location specified above. The name of the content source folder will be a normalized version of the content source name specified from the UI.

The content source folder name normalization follows this set of rules:

  1. Remove whitespaces
  2. If the folder name already exists, add a consecutive number id at the end of the name.


  • Name: test folder --> Normalized Name: testfolder
  • Name: testfolder --> Normalized Name: testfolder1
    • Assumption: testfolder already exists.

For correctly loading a content source, all four files are required on its configuration folder, otherwise the content source will not be loaded into the UI. These files are: general.xml, connector.xml, content-source.xml and workflow.xml.

General Configuration File

The general.xml file contains the general information associated with the content source: displayName, normalizedName (used to uniquely identify the content source), schedule and the current state (active or inactive) of the content source.

<contentSource active="true">
  <schedule type="manually"/>

Connector Configuration File

The connector.xml file contains the connector application definition and property values to install the connector into Aspire.

<application config="com.searchtechnologies.aspire:app-cifs-connector">
    <property name="generalConfiguration">true</property>
    <property name="snapshotDir">${}/${}/snapshots</property>
    <property name="ExtractTextMaxSize">unlimited</property>
    <property name="disableTextExtract">false</property>
    <property name="workflowReloadPeriod">15s</property>
    <property name="workflowErrorTolerant">false</property>
    <property name="debug">true</property>

Content Source Configuration File

The content-source.xml file contains the content source specific configuration to connect and perform a crawl against a given repository. Information like the repository url, the user credentials and any other repository configuration required by Aspire to crawl said repository.

    <include pattern=".*LSA.*"/>
    <exclude pattern=".*tmp.*"/>

Workflow Configuration File

The workflow.xml file contains the workflow configuration of all workflow trees configured for the content source: afterScan, onPublish, onAddUpdate, onDelete and/or onError. This file contains the configuration of all rules set on each of these workflow trees. For more details see Workflow.

<?xml version="1.0" encoding="UTF-8"?>
<workflow version="2">
    <template id="Boolean (Byte array)" type="choice">
      <description>Boolean test (from a byte array)</description>
      <ruleDescription>Tests if the value of '${field}' is '${value}'</ruleDescription>
      <dxf><dxf:template version="1.0" xmlns:dxf=""><properties><field display="Field name" type="string"><dxf:help>The field from the document to test</dxf:help></field><value display="Value" type="string"><dxf:help>The value to test for</dxf:help></value></properties></dxf:template></dxf>
        f = doc.${field}?.getContent()
        if (f instanceof byte[])
          f = new String(f)
        f == "${value}"</script>
    <template id="JobTerminate" type="script">
      <description>Terminates the job</description>
      <ruleDescription>Terminates the job</ruleDescription>
    <template id="RaiseException" type="script">
      <description>Raises an exception</description>
      <ruleDescription>Exception: "${msg}"</ruleDescription>
      <dxf><dxf:template version="1.0" xmlns:dxf=""><properties><msg display="Message" type="string"><dxf:help>The exception message</dxf:help></msg></properties></dxf:template></dxf>
        throw new AspireException("WorkflowException", "${msg}")
    <template id="SetStringValue" type="script">
      <description>Assigns a string value to a field</description>
      <ruleDescription>Assigns the value "${value}" to the field ${field}</ruleDescription>
      <dxf><dxf:template version="1.0" xmlns:dxf=""><properties><field display="Field name" type="string"><dxf:help>The field from the document to modify</dxf:help></field><value display="Value" type="string"><dxf:help>The string value to set</dxf:help></value></properties></dxf:template></dxf>
      <script>doc.${field} = "${value}"</script>
    <template id="Switch (Byte array)" type="choice">
      <description>Switch (from a byte array)</description>
      <ruleDescription>Switches based on the value of '${field}'</ruleDescription>
      <dxf><dxf:template version="1.0" xmlns:dxf=""><properties><field display="Field name" type="string"><dxf:help>The field from the document to test</dxf:help></field></properties></dxf:template></dxf>
        f = doc.${field}?.getContent()
        if (f instanceof byte[])
          f = new String(f)
    <rule appName="/PostToCIFS" config="com.searchtechnologies.aspire:app-publish-to-file" id="1" type="application">
        <property name="logFile">log/${}/</property>
        <property name="debug">false</property>
        <property name="numJobs">5</property>
    <plan name="onPublish">
      <reference rid="1"/>
    <application config="com.searchtechnologies.aspire:app-publish-to-file" name="/PostToCIFS">
        <property name="logFile">log/${}/</property>
        <property name="debug">false</property>
        <property name="numJobs">5</property>

Adding Content Source from the File System

Aspire 2.0 allows users to create and add content sources directly from the configuration files without the need of saving the content sources through the UI and without restarting Aspire. This is possible due to the synchronization functionality introduced with ZooKeeper for failover. See Aspire Zookeeper for more information.

To add a content source configuration:

  1. Create a new folder, outside of ${aspire.home}/config/content-sources, with the normalizedName of the content source.
  2. Create the general.xml as described above. Make sure the normalizedName element has the same value as the folder name.
  3. Create the connector.xml and content-source.xml as described above. For more information on different content sources available, visit the Developer Notes for each Connector.
  4. Create the workflow.xml as described above. For more information, visit Workflow.
  5. Copy the folder normalizedName into ${aspire.home}/config/content-sources
  6. Refresh the Aspire Management page, if there are no errors, you will see the new content source.