Fusion 3.1.2: Call Pipeline Index Stage


So you realize that sometimes you want your document to go to one collection or another, or perhaps even both. How would you do that? The cat is on vacation and so didn’t respond.

Let’s look at how to send a document to a different collection.

The Short List

  1. Create 2 collections: call-pipeline-test1 and call-pipeline-test2
  2. Edit the index pipeline for call-pipeline-test1
    1. Add to call-pipeline-test1-default index pipeline the Call Pipeline stage
      1. Collection: call-pipeline-test2
      2. Pipeline: call-pipeline-test2-default
    2. Press Save
  3. Collection: call-pipeline-test2
    1. Don’t do anything
  4. Add a Datasource to the call-pipeline-test1 collection making sure it uses the call-pipeline-test1-default index pipeline
  5. Run the crawl
  6. Open the Query Workbench for both collections. There will be documents in both.

The Long List

Create 2 collections: call-pipeline-test1 and call-pipeline-test2

Once Fusion has started go to Devops -> Collections -> New -> Collection Name and enter call-pipeline-test1.
Press Save Collection.

Create another collection and call it call-pipeline-test2.

Fusion automatically created default index and query pipelines for both collections. They are named after the collection with a suffix of -default (in this case call-pipeline-test1-default and call-pipeline-test2-default).

Edit the index pipeline for call-pipeline-test1

Return to the Fusion home page and select call-pipeline-test1 from the dropdown of collection names. Press the Search panel to take you to the Search page.

In the Search page select Index Pipelines from the Menu Panel to the left.

That will open the Index Pipeline panel. Select the call-pipeline-test1-default pipeline and press the button labelled Add a New Pipeline Stage. In the input field enter cal. That will bring up Call Pipeline as a stage choice.

Select Call Pipeline. That will cause that stage’s configuration fields to be displayed.

Enter the following:

  • Collection: call-pipeline-test2
  • Pipeline: call-pipeline-test2-default

Press Save in the upper right-hand corner of the panel. The configuration should look like this:

There is no configuration needed to the second collection unless there is some pre-processing of the document you would like to do before indexing it.

Add a Datasource to the call-pipeline-test1 collection making sure it uses the call-pipeline-test1-default index pipeline

We should still be configuring the call-pipeline-test1 collection.

Close the index pipeline panel by clicking on the X in the top right-hand corner.

Select Datasources from the menu panel. For this example I am going to index a CSV file so I will be choosing the Local Filesystem datasource. Use your favorite datasource.

Configure the datasource and make sure it uses the call-pipeline-test1-default. For this example, since I am indexing a CSV file, the default Parsers can be left alone.

Save your datasource. My configuration looks like this:

Run the crawl

Press Run -> Start on the datasource and either wait for it to finish or Stop it once you know some documents have been indexed.

Open the Query Workbench for both collections. There will be documents in both

The moment of truth. Either close the Datasource panel and click on Query Workbench, or press the plus sign in the upper right-hand corner of the panel and select Query Workbench from the new Menu panel.

You should see content in the first collection.

Navigate to the second collection and open the Query Workbench there. The content should also be there.

Quick Update

The above works great if you are just sending content to another collection. There is an issue with the use of the pipeline defined in the Call Pipeline stage. Updates as they happen.

Disclosures

Carlos Valcarcel is a full time employee of LucidWorks, but lives in New York as he prefers hurricanes to earthquakes. Having worked at IBM, Microsoft, and Fast Search and Transfer the only thing he is sure of is that the font editor he wrote on his Atari 800 was the coolest program he has ever written. While questions can be a drag he admits that answers will be harder to give without them.

The cat isn’t real, but then neither are you. Enjoy your search responsibly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s