Index Load configuration files for indexing from CSV files

We can load index information from a CSV file. Index Load requires configuration files before it can be run from a web browser.


Loading the index from a CSV file

Follow these steps to load index information from a CSV file.

  1. Edit the wc-dataload-profile.xml configuration file, and add the CSV file location, and the target core name.

  2. Specify CSVReader as the reader, and SolrIndexLoadMapObjectBuilder as the business object builder in wc-businessObject-profile.xml.

If we are using a CSV file to load index data, Index Load requires three configuration files. These files are based on the XML schema definitions of the Data Load framework:

Index Load configuration file Schema definition file
Environment configuration file (wc-indexload-env.xml) wc-dataload-env.xsd
Profile configuration file (wc-indexload-profileName.xml) wc-indexload.xsd
Profile item configuration file (wc-indexload-businessobject.xml) wc-indexload-item.xsd


Environment configuration file (wc-indexload-env.xml)

The wc-indexload-env.xml file contains environment control information and global properties required by Index Load, including a common data writer and data source to be used to persist the data.

The wc-indexload-env.xml file does not typically require customization. We can use the default sample file as-is.


Profile configuration file (wc-indexload-profileName.xml)

The wc-indexload-profileName.xml file contains configurable performance attributes and load item configurations.

Profile names that we define in configuration files are then substituted in as a URL parameter when you call Index Load in a web browser.

The load item configurations are listed under the load order section of this file. They are processed in the same order as they are specified.

It can contain one or multiple LoadItem definitions, with every LoadItem configuration specifying the specific LoadItem configuration and coreName target. Multiple LoadItems are run in parallel, without sequence. Example: wc-indexload-price.xml

The following configurable performance attributes apply to profile configuration files:


Profile item configuration file (wc-indexload-external-price.xml)

Where


Sample configuration files

Download and extract the following sample code: IndexLoadSampleCode.zip. The sample includes configuration files used by Index Load, and manual updates that are performed in the Indexing contract prices using Index Load task, for reference.