Configuring Hits Enrichment

Nesting feeds in one another gives you the possibility of enriching the hits of a query with other sources to bring related content to the user. This can be achieved because nested feeds can use parent metas.

In the following use case, our application starts by retrieving information about TV series using a CloudView Search feed. It then tries to enrich each hit with images retrieved by a Google Search feed using the TV series title.

Example of hit enrichment in Mashup UI

The following XML Configuration represents how the hit enrichment presented above is coded.

<Feed id="test" enable="true" embed="true" className="com.exalead.access.basefeeds.PageFeed">
<Parameters>
<Parameter name="q">${page.params["q"]}</Parameter>
</Parameters>
<SubFeeds>
<Feed id="movies" enable="true" embed="true" className="com.exalead.access.basefeeds.CloudviewFeed">
<Parameters>
<Parameter name="searchAPIVersion">V6R2015x</Parameter>
<Parameter name="searchapi">{access-api.searchapi.url}/search</Parameter>
<Parameter name="q">${page.params["q"]}</Parameter>
<Parameter name="defaultQuery">#all</Parameter>
<Parameter name="page">1</Parameter>
<Parameter name="per_page">10</Parameter>
</Parameters>
<Properties>
<Property kind="TITLE" name="TITLE">${entry.metas["title"]}</Property>
</Properties>
<SubFeeds>
<Feed id="pictures" enable="true" embed="true" className="com.exalead.access.basefeeds.ExaleadSearchFeed">
<Parameters>
<Parameter name="searchapi">http://api.exalead.com/search/</Parameter>
<Parameter name="q">${entry.metas["title"]}</Parameter>
<Parameter name="defaultQuery">#all</Parameter>
<Parameter name="type">image</Parameter>
<Parameter name="apiKey">appkey</Parameter>
<Parameter name="page">1</Parameter>
<Parameter name="per_page">10</Parameter>
</Parameters>
</Feed>
</SubFeeds>
</Feed>
</SubFeeds>
</Feed>