IBM Support

Importing and exporting crawler field mapping configurations

Product Documentation


Abstract

You can run commands to export field mappings from one crawler, and then import the field mappings to configure a different crawler.

Content

To use these commands, you must upgrade to the required fix pack level:

  • If you use Watson Explorer Content Analytics, upgrade to Version 10.0.0.1
  • If you use Watson Content Analytics, upgrade to Version 3.5.0.2

Command syntax to export field mappings from a crawler configuration:

esadmin configmanager exportFieldMapping -crawlerid [crawlerid] -scope [scope] -fname [fileName]

Where:
-crawlerid: is the crawler ID from which you want to export configuration data, such as col1.JDBC_34611.
-scope: identifies the type of data that you want to export. Specify one of the following values:
  • metadata. You can see the data that will be exported by editing the crawl space and opening the Edit metadata page.
  • entireCrawlSpace. This option applies only to the Notes crawler. When you configure a crawl space for the Notes crawler, you can specify field mappings that apply only to that crawl space or specify that the crawl space is to use common field mappings that can be shared by multiple crawl spaces owned by the crawler. If you specify "-scope entireCrawlSpace", the common field mappings will be exported. You can see the data that will be exported by editing the Notes crawl space and opening the Edit Crawl Space Options page.
  • the crawl space ID, such as t1413778226085. You can see the data that will be exported by editing the crawl space options. The link that you click to edit crawl space options depends on the crawler type. For the Notes crawler, the crawler uses this type of field mapping, which is unique to the crawl space, only when Apply options that you configure for this data source is specified on the Select the type of options to use page. Otherwise, the Notes crawler uses the common field mappings.
-fname: is the fully qualified name of the XML file that will contain the exported configuration, such as /home/esadmin/exportedFieldMapping.xml.

After you run this command, the field mapping configuration data for the specified crawler is exported to the specified XML file.

Command syntax to import field mappings into a crawler configuration:

esadmin configmanager importFieldMapping -crawlerid [crawlerid] -scope [scope] -fname [fileName]

Where:
-crawlerid: is the crawler ID to which you want to import configuration data, such as col1.JDBC_34622.
-scope: identifies the type of configuration data that was exported. Specify one of the following values, depending on how the data was exported:
  • metadata
  • entireCrawlSpace
  • the crawl space ID
-fname: is the fully qualified name of the XML file that contains the exported configuration data, such as /home/esadmin/exportedFieldMapping.xml.

After you run this command, the field mapping configuration data is applied to the crawler, and the new configuration is synchronized among the Content Analytics servers.

Procedure:
  1. Collect the crawler ID and crawl space ID of the crawler and crawl space from which you want to export field mappings. To obtain the crawler ID, open the Edit Crawl Space page and copy the crawlerID value in the URL, such as crawlerID=notes1.NOTES_34263. To obtain the crawl space ID, click the crawl space on the Edit Crawl Space page, and copy the tableId value in the URL, such as tableId=CrawlerNotesViewFolderDoc1413841028839.
  2. Collect the crawler ID and crawl space ID of the crawler and crawl space into which you want to import the field mappings.
  3. Run the exportFieldMapping command.
  4. If you want to import the field mappings into a different collection, create the required index fields in the target collection by using the import/export index fields function or by manually creating them.
  5. Run the importFieldMapping command.
  6. If the crawler session where you imported field mappings is running, stop and restart it.
  7. If the indexer session in the collection where you imported field mappings is running, stop and restart it.

The imported field mappings are applied in the target crawler configuration after crawling and indexing are completed.

[{"Product":{"code":"SS8NLW","label":"IBM Watson Explorer"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"},{"code":"PF002","label":"AIX"}],"Version":"10.0.0.1","Edition":"Advanced","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SS5RWK","label":"Content Analytics with Enterprise Search"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"","label":"Linux on System z"},{"code":"PF033","label":"Windows"}],"Version":"3.5","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 June 2018

UID

swg27044440