Make parallel requests with feeds

Creating parallel requests is useful if you have different indexes or if you want to search for specific content in the same index using different queries.

The following use case describes how to proceed if you want your application to fetch hits from two sources using the same query basis:

  • One of these source is a filesystem crawl retrieving data through a Files connector. In our example, the set of documents located under the <INSTALLDIR>/docs/ directory.

  • The other one is a web crawl retrieving data through an HTTP connector. In our example, the NETVIBES website (http://www.exalead.com/software/).

Our application is configured in the Mashup Builder to use two CloudView Search feeds that will select the 2 most relevant hits for the request on the search results page ${page.params["q"]} to focus on the two specific data sources.

By making a query on the Mashup Builder, we see below that the search page displays results coming from the two data sources; one from an NETVIBES website URL and another from the filesystem.


Before you begin: Using more than one feed per page is only possible with Mashup Builder Premium.
See Also
About Mashup Builder feeds
Enrich hits with nested feeds
Synchronizing feeds on a page

Context: This procedure describes the steps to create the example presented above.

  1. In Mashup Builder, open one of your application pages, for example search, and select the Feeds view.
  2. Drag and drop a CloudView Search feed, and from the Feed ID field, call it files.
  3. Set the feed properties as follows:
    1. For User query > Query, enter for example source:fs ${page.params["q"]} (where fs stands for a file system source managed by a Files connector).
    2. For User query > Hits per page, enter 2.
    3. Under Properties / Mapping, for TITLE, enter ${entry.metas["file_name"]}
  4. Drag and drop another CloudView Search feed below the first one, and call it crawls.
  5. Set the feed properties as follows:
    1. For User query > Query, enter for example source:web ${page.params["q"]} (where web stands for a web source managed by an HTTP connector).
    2. For User query > Hits per page, enter 2.

    The configuration should look as follows.



  6. Select the Design view, and add the two feeds (files and crawls) to a widget, for exam­ple Result List.



  7. Select the Preview to check your configuration changes.
  8. Click Apply.

The Mashup Builder displays results coming from the 2 data sources.

Example of parallel requests on the Mashup Builder