Modify the Display of Hit Titles

First, let us improve how the hits display in the Mashup UI with dynamic titles.

By default, the title that displays for each hit is based on this value ${entry.metas['title']|entry.metas['url']} where title and url are default meta names. This expression is defined using the Mashup Expression Language (MEL).

Our sales class does not have a title meta and the url meta displayed by default (as id=<integer>&) is not meaningful. We want to display the quantity of each product sold by salesmen and saleswomen.

This task shows you how to:

Tutorial: Display the Quantity of Each Product Sold by Sales People

  1. Open Mashup Builder.
    • Go to http://<HOSTNAME>:<BASEPORT+1>/mashup-builder
    • Or from the Administration Console top bar, use the application selector.

  2. In Mashup Builder, select the /search page, and then the Design view.
  3. Click the header of the Result List widget.
  4. On the widget properties panel, define the value of the Hit title field as follows:

    ${entry.metas['quantity']} units of ${entry.metas['name']} - sold by ${entry.metas['firstname']} ${entry.metas['lastname']}

    To build this expression, select the Exalead CloudView metas from the dynamic list on the left.

  5. Remove the thumbnails, as our database records do not have images.
    1. Select the Hit thumbnail tab.
    2. In Display thumbnails, select none.
  6. Click Apply.

Tutorial: Check the Display of Hit Titles

  1. Go to the Mashup UI search page: http://<HOSTNAME>:<BASEPORT>/mashup-ui /page/search?q=
  2. Refresh the /search page to view the results of your changes.