UC-8: Consolidating Data from Storage Service

It is interesting to combine the information coming from Exalead CloudView features like tagging or comments, relying on the Storage Service, with original data to search or refine on new values.

In this use case, we want to index the tags defined on country documents (that is, storageKey_tags) and use them as new facets.

This task shows you how to:


Before you begin:
  • We assume that previous UCs have been completed.
  • The Storage Service is activated. For more information, see Configuring Data Storage for Collaborative Widgets in the Exalead CloudView Mashup Builder User's Guide.
  • The RepushFromCache setting must be set to false in the <DATADIR>/config/360/StorageService.xml file (default configuration).

Step 1 - Define the Source Connector for StorageService

  1. In the Administration Console, go to Index > Connectors and click Add connector.
    1. In Name, enter storageService.
    2. For Type, select the JDBC connector.
    3. For Push to PAPI server, select the Consolidation server cbx0 instance.
    4. Click Accept.
  2. For Store documents in data model class, enter storageValue.

    Note: This class is not present in the data model yet. It is only used by the Consolidation Server.

  3. In Connection parameters:
    1. For Driver, enter org.sqlite.JDBC
    2. For Connection string, enter jdbc:sqlite://<DATADIR>/storageService/storage.db.sqlite
    3. Click Test connection. The database connector automatically connects to the database.
  4. In Query parameters:
    1. For Synchronization mode, select Query-based incremental synchronization
    2. For Initial query, enter: select ikey, ukey, value, res_type, res_id, modified_date, source, app_id, build_group from cv360_storage_service
    3. For All URI Query, enter: select ikey, ukey from cv360_storage_service
    4. For Checkpoint query, enter: select max(modified_date) from cv360_storage_service
    5. For Incremental variable, enter: TS
    6. For Incremental query, enter: select ikey, ukey, value, res_type, res_id, modified_date, source, app_id, build_group from cv360_storage_service where modified_date > '$(TS)'
  5. Click Retrieve fields.
  6. Define the ukey and ikey fields as primary keys.
    1. Click the ukey field to expand it.
    2. Select Use as primary key.
    3. Repeat the operation for the ikey field.
  7. For the value field:
    1. Delete the automatic processor.
    2. Click Add column processor and add a MultipleMetas processor.
    3. For Meta Name, enter value.



  8. Click Apply.

Step 3 - Add Tags to Countries

  1. Open the following Mashup UI application page: http://<HOSTNAME>:<BASEPORT>/mashup-ui/page/searchcountry_v4
  2. Search for a country, for example, Singapore .
  3. Click the see details link.
  4. Click the Tag this country link to add a tag to the selected country. For example, for Singapore, enter asian country and press ENTER.
    asian country displays as tag.

  5. Perform the 3 previous steps to tag Japan as asian country too.

Step 4 - Index Tags

  1. Click Scan for the storageService JDBC connector and wait for data to be fully indexed.

    Two documents are indexed for the storageService connector.

  2. Open the Mashup UI application again: http://<HOSTNAME>:<BASEPORT>/mashup-ui/page/searchcountry_v4

You can now see a new Tags facet in the Refinements panel, displaying the values entered for the tagged documents.

The following graphic shows what we achieved on the object graph (Max. arcs per node has been set to 10 for more readability).