This section of the Application Builder Tutorial
describes how to configure collection to collect activity information.
About this task
To support an activity feed, you will need to modify several configuration settings in your
example-metadata search collection. The steps to do so are the
following:
Procedure
- In your Watson Explorer Engine administration tool,
navigate to your example-metadata search collection and click the
Configuration tab.
- In your search collection configuration page, click the
Converting subtab.
- Click the Add a new converter button. A window displays a list
of converters that you can add to your search collection.
- From the list of converters, select Activity feed. Click
Add.
- In the Always retrieve and Return diffs
fields, configure the type of data fields that you want to return as part of an activity
feed. For the purposes of this tutorial, add the following to the Always
retrieve field:
title
year
genre
hero
author
publisher
To specify the fields to collect old and new values, in the
Return
diffs field, add the following fields:
year
genre
Click
OK. You have
added and configured the activity feed converter to your search collection.
- Next, navigate back to your seed configuration page and in the Global
Settings configuration section, click Edit.
- Expand the Advanced section.
- Scroll to the Activity feed setting. From the list of options,
select All.
Note: All configures your search collection to return
all changes to the information it contains. Alternatively, you can configure your
activity feed to return only URLs instead of the data that was actually changed, which
could be a performance consideration when dealing with large collections. For purposes
of this tutorial, All enables your users to see any new data that
was added, modified, or removed in the example-metadata search
collection.
- Click OK.
- On the Overview tab, resume indexing and click
refresh to recrawl your collection.
At this point, you have configured your collection to monitor activities. Next, you
will change data in one of the sample files in the example-metadata collection,
recrawl the collection, and query the activity feed to confirm that it is configured
correctly.
As an example, suppose that you just learned from one of your literary agents that the
book Tow Truck Tales was incorrectly categorized as
Non-Fiction. Moreover, you were informed that the book was
republished as a work of fiction in 2012. You want to update the file with the correct
information and share that update with the users of your application.
- In a text editor, open the tow_truck_tales.html file in your
search collection, which is located in the
examples/data/metadata-example/ subdirectory of your Watson Explorer Engine installation. In the second row of the HTML
table in this file, change the Genre field value to
Fiction and Year field value to
2012. Save the file and close it.
- Navigate to the Overview tab of the
example-metadata search collection. Click
refresh to recrawl your data.
Results
You now have modified your search collection to support creating and delivering changed
content to your users.