Indexing a Database Using a View
To use embedded views
-
Create a database source (see Configuring and Indexing a Database Source).
-
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.
-
-
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.-
On the Coveo server, access the Administration Tool (see Opening the Administration Tool).
-
Access the Sources and Collections page (Index > Sources and Collection).
-
In the Source section, expand the drop-down list of the appropriate source.
-
Select Edit Permissions. The Permissions page of the selected source is displayed.
-
Select Specify the security permissions to index.
-
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. -
Click Apply Changes.
-
-
From the created view:
Note: No configuration file is required when using this method.-
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 -
On the Coveo server, access the Administration Tool (see Opening the Administration Tool).
-
In the Source section, expand the drop-down list of the appropriate source.
-
Select Edit Permissions. The Permissions page corresponding to the source is displayed.
-
In the Permissions section, select Index security permissions.
-
-
From a configuration file:
-
Create a configuration file (see Example of a Configuration File for the Database Connector and Indexing a Database Using a Configuration File).
-
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. -
-