Product DocsMenu

Indexing a Database Using a View

You can index data from a database using embedded views (queries), which are defined directly in your database.

To use embedded views

  1. Create a database source (see Configuring and Indexing a Database Source).

  2. In your database, create a view that returns at least the URI field (see Creating a View in a Database).

    Note: The URI field value must be a valid URI, meaning it must have any scheme prefix followed by a unique identifier (ex.: odbc://id=4).

    The fields that can be mapped to a document are:

    • Uri

    • UriCaption

    • ClickableUri

    • PrintableUri

    • Title

    • FileName

    • ContentType

    • BinaryBody

    • Body

    • ModifiedDate

    • All security-related fields.

  3. Define the required security permissions on your documents using one of the following methods:

    • In the Administration Tool:

      Note: No configuration file is required when using this method.
      1. On the Coveo server, access the Administration Tool (see Opening the Administration Tool).

      2. Access the Sources and Collections page (Index > Sources and Collection).

      3. In the Source section, expand the drop-down list of the appropriate source.

      4. Select Edit Permissions. The Permissions page of the selected source is displayed.

      5. Select Specify the security permissions to index.

      6. Specify the necessary users in the Allowed Users and Denied Users lists.

        Note: To add a new user, enter the username in the corresponding box and click Add. By default the Allowed Users list contains everybody that has access to the indexed documents.
      7. Click Apply Changes.

    • From the created view:

      Note: No configuration file is required when using this method.
      1. In the created view, add new fields containing the required permissions for every document.

        Security type User type Required field names
        User-related Server-related
        Windows Allowed users AllowedWindowsName AllowedWindowsServer
        Denied users DeniedWindowsName DeniedWindowsServer
        Custom group Allowed users AllowedCGName AllowedCGServer
        Denied users DeniedCGName DeniedCGServer
        Custom user Allowed users AllowedCUName AllowedCUServer
        Denied users DeniedCUName DeniedCUServer
      2. On the Coveo server, access the Administration Tool (see Opening the Administration Tool).

      3. In the Source section, expand the drop-down list of the appropriate source.

      4. Select Edit Permissions. The Permissions page corresponding to the source is displayed.

      5. In the Permissions section, select Index security permissions.

    • From a configuration file:

      1. Create a configuration file (see Example of a Configuration File for the Database Connector and Indexing a Database Using a Configuration File).

      2. Add an AllowedUsers node in which it is possible to define allowed and denied users for every document.

      Note: Creating a configuration file implies that query expressions have to select the entire view or the required fields.
People who viewed this topic also viewed