Skip to main content
Version: 11.14.0

Highlighting Entities in the SBA Preview

In this chapter, you will highlight entities in the Mint document preview.

Backend Configuration

When indexing data, you have to set up entities for extraction, which are stored in the Sinequa index(es).

note

In the Sinequa demo server, there are multiple entities extracted for you.

In this exercise, you will highlight two entities: entity13, using the column alias exectitle, and entity14, using the column alias finance.

As a reminder, use of column aliases is a best practice, and they are created in the Mint Query Web Service.

Additionally, a Preview Web Service must be configured to define the highlights to display. This web service is then attached to your app.

Preview Web Service

Modifying the highlight.config.ts File

File location per release

The location of highlight.config.ts changed between releases:

ReleasePath
11.13.0 and earliersrc/app/highlight.config.ts
11.14.0 and latersrc/config/highlight.config.ts

The file structure and the PREVIEW_HIGHLIGHTS constant are identical in both locations — only the path differs.

release/11.13.0 and earlier

  1. Go to src > app > highlight.config.ts.

  2. Add the following to the PREVIEW_HIGHLIGHTS constant:

    {
    name: 'exectitle',
    color: 'black',
    bgColor: '#F5DCD5'
    },
    {
    name: 'finance',
    color: 'black',
    bgColor: '#59ED78'
    },
  3. Save your changes.

release/11.14.0 and later

Starting from release 11.14.0, the configuration file was moved out of the app/ folder into a dedicated config/ folder to separate application configuration from Angular application code.

  1. Go to src > config > highlight.config.ts.

  2. Add the following to the PREVIEW_HIGHLIGHTS constant:

    {
    name: 'exectitle',
    color: 'black',
    bgColor: '#F5DCD5'
    },
    {
    name: 'finance',
    color: 'black',
    bgColor: '#59ED78'
    },
  3. Save your changes.

note

If you followed the Connecting to Sinequa tutorial, Mint should recompile automatically. If not, run the npm run start command in the terminal.

  1. Go to your Mint application and execute a search for Morgan Stanley.

  2. Click on the first result (anywhere other than the title) to display the HTML document preview.

HTML document preview

  1. In the preview panel, toggle entity higlighting on by clicking the lightbulb icon.
note

You should see finance terms (e.g., investment, revenue) highlighted in green:

Finance entities highlighted

You should also see executive titles (e.g., CEO, chief operating officer) highlighted in pink:

Executive Title entities highlighted