In this section:
This section explains how to configure an iWay channel to capture a sample document from the data source.
In iWay Service Manager, a channel serves as a container of specific iWay components, such as listeners, preparers, transforms, process flows, and emitters, through which a document containing messages or data pass. All channels must contain three sub-containers, an inlet (which is the entry point to the channel), a route (which defines the path through the channel), and an outlet (which defines how the document leaves the channel). You can create new iWay components or use existing components to configure a channel.
Using our example, we first need to extract the XML structure from our database and place the documents into a directory we can access for later use. To do this, we will create a simple channel with:
Note: All RDBMS listeners generate XML representations of table records. Once this channel is deployed, we can generate a sample XML file from which we can extract the XML structure needed in the indexing process flow.
Using the RDBMS adapter requires its corresponding JAR file to be added to the iWay environment (located in the \iWay\lib directory by default) and requires iWay to be restarted. For more information on installation requirements for the RDBMS adapter, see the iWay Installation Guide.
As a reminder, we will be designing the components of our channel and configuring the channel in the Registry (the design-time repository). We will then deploy the channel to a run-time iWay Service Manager and activate it to begin the indexing process.
The following is a summary of the steps involved in setting up the iWay channel. This section provides instructions for each of these steps.
The iWay Service Manager opens, as shown in the following image.
Note: The directory that contains the database jar files must be included in the system classpath. Typically, this directory is install_drive:\Program Files\iway60\lib.
The Listeners dialog box opens on the right, as shown in the following image. From this dialog box you can see a list of previously configured listeners and create new listeners.
The Select Listener Type dialog box opens.
In this example, the data source is a database, so the listener type is RDBMS, as shown in the following image.
Tip: You can also use a Relational Database High Water Mark (RDBHWM) listener, which is useful when you have read-only permissions and you want to select records that exceed a high water mark, such as a last-update time of day value. For details on the RDBHWM listener, see the iWay Service Manager Extensions User's Guide.
The Configuration parameters dialog box opens. The following image shows part of the parameters dialog box for the RDBMS listener. Use the scroll bar to access all properties in the window.
The following are some recommended settings for Magnify:
The Multi-threading and Polling Interval settings can be used to optimize the Magnify platform.
Note: SQL Query is how to get new data in the table. SQL Postquery is responsible for updating the table after a record has been read by the listener. Controlling the post query operation as part of the process flow may be optimal. For example, for larger bulk processing where queries need to be limited by rows returned.
To continue with the example established in the Magnify Search Feed Example, we will name the listener, Retail_DB.
The Listeners pane is refreshed with the new listener, as shown in the following image.
Now we will create the inlet that will hold the listener.
The Inlets pane opens on the right, listing the existing inlets.
The New Inlet Definition pane opens, as shown in the following image.
The Construct Inlet pane opens, as shown in the following image.
Now we will add the listener that we created earlier.
The Select component type pane opens, as shown in the following image. This provides a selection of components that are allowed in an inlet.
The Select a listener definition pane opens, which lists available listeners to add to the inlet. The following image shows this pane with the listener, RetailDB, we created earlier.
The Construct Inlet pane opens showing the selected listener as part of the inlet. The following image is an example of this pane showing our RetailDB listener.
Now create the emitter.
The Emitters pane opens on the right with a list of existing emitters.
The Select emitter type pane opens.
The Emitters Configuration parameters pane opens, as shown in the following image.
Note: The emitter creates a file for each row in the database when running and automatically numbers the files according to the format you provide in the Destination field. In the file name format, designate how many digits the number will contain with hash marks (#).
The following is an example of an entry for the Destination field:
This example designates six digits for the file name, therefore, the file names that are output will be 000001.xml. 000002.xml, 000003.xml, and so on. If you designate one digit (#.xml), the file names will be 1.xml, 2.xml, 3.xml, and so on. The automatic numbering always starts with 1.
true to create the directory you specified in the Destination field if it does not exist.
false to not create the directory if it does not exist.
The Provide a name for the new emitter pane opens.
Our example names the emitter RetailDB_FileEmitter, as shown in the following image.
The Emitters pane opens and displays the new emitter in the list of emitters.
Now create the outlet to contain the new emitter.
The Outlets pane opens on the right with a list of existing outlets. An example of this pane is shown in the following image.
The New Outlet Definition pane opens, as shown in the following image.
The Outlets, Construct Outlets pane opens, as shown in the following image. This pane shows the components currently assigned to the outlet. Since this is a new outlet, none appear.
The Select component type pane opens, as shown in the following image, with a selection of the allowable components for an outlet.
The Select an emitter definition pane opens with a list of available emitters, including the emitter you previously created.
The Outlets, Construct Outlets pane opens, showing that the emitter is now registered in the outlet. An example of this pane is shown in the following image.
Now that we have all of the components for our channel, we can create the channel.
The Channels pane opens on the right and lists the existing channels in your configuration.
The New Channel Definition pane opens, as shown in the following image.
The Channels, Construct Channel pane opens, as shown in the following image. This pane lists the components registered to the channel. Since this is a new channel, there are no registered components.
The Channel Component Types pane opens, as shown in the following image. This pane allows you to select an Inlet, Route, or Outlet component to add to the channel.
The Channels, Construct Channel pane opens showing the inlet you added to the channel. An example of this pane is shown in the following image.
Next, we need to add a route, which defines the path of the document through the channel.
Note: Every channel must contain an inlet, route, and outlet. Though we did not create a custom route, there is a default route available in iWay.
The Channel Component Types pane opens.
The Select one or more route definitions pane opens. This pane lists the routes available to the channel.
Note: This route simply moves the document from the inlet to the outlet, without additional processing.
The Channels, Construct Channel pane opens showing the inlet and the route you added to the channel. An example of this pane is shown in the following image.
The Channel Component Types pane opens with the Route and Outlet options available.
The select one or more outlet definitions pane opens. This pane lists the outlets available to the channel, as shown in the following image.
In this example, the outlet is RetailDB_Outlet.
The Channels, Construct Channel pane opens showing the inlet, route, and the outlet just added to the channel. An example of this pane is shown in the following image.
The Channels build results pane opens, as shown in the following image. This pane shows the status of the build steps and indicates the build was successful.
The channel has been successfully created and is ready to be deployed, which makes it available for use.
The Channel Management pane opens, as shown in the following image.
The Available Channels pane opens, as shown in the following image.
The Channel Management pane opens and lists the channel you just deployed. An example of this pane is shown in the following image.
A green check mark in the Status column indicates the channel, and therefore, the listener, is active. To stop the channel (listener), click the green check mark.
A yellow caution sign in the Status column indicates there was an error in activating the channel. The Description column provides information about the error.
Once the channel is deployed and started, verify that the destination directory you configured when creating the emitter exists and that it contains XML documents. These are the sequentially numbered files, for example, 00001.xml, 00002.xml, and so on.
If this directory does not exist or it is empty, check the parameters you entered while configuring the listener and the emitter. Use the following steps to update the channel:
These files provide the structure of the data coming from our data source. This information is important and will be used in designing our indexing process flow.
Now that you have configured the search engine and a channel with a listener for the data source, continue to Creating the Indexing Process Flow to configure the process flow.