You can add the content of your domain’s Google Drives to a
Coveo organization
by creating a Google Drive for Work
source
.
By default, a Google Drive for Work source indexes only
My Drive
content.
However, you can configure it to index content from both
My Drive
and
Shared drives
, or only from
Shared drives
. See
how to index content from shared drives
.
When using the Coveo
quickview
component in search results, users won’t be able to preview files over 50 MB that aren’t native to Google Drive, such as
.pdf
or
.xls
.
Your source enforces this limit to reduce indexing times.
However, your source still indexes the
item
, and users can click the search result to access the item in Google Drive.
Google Drive for Work version
Latest cloud version
Following available Google Drive for Work releases
The number of
items
that a source processes per hour (crawling speed) depends on various factors, such as network bandwidth and source configuration.
See
About crawling speed
for information on what can impact crawling speed, as well as possible solutions.
Ensure to have a Google account with administrator credentials.
These credentials allow your Coveo organization to read your Google account using OAuth 2.0, a protocol that authorizes access without giving your password.
Follow the instructions below to add a Google Drive for Work source.
Leading practice
It’s best to create or edit your source in your sandbox organization first.
Once you’ve confirmed that it indexes the desired content, you can copy your source configuration to your production organization, either
with a snapshot
or manually.
In the
Add a Google Drive for Work Source
panel, the
Configuration
tab is selected by default.
It contains your source’s general and authentication information, as well as other parameters.
General information
Source name
Enter a name for your source.
Optical character recognition (OCR)
If you want Coveo to extract text from image files or PDF files containing images, enable the appropriate option.
Choose
All
to index the Google Drive content of all your domain users.
If you want to index the content of specific users, select
Specific
and enter their email addresses.
By default, the Google Drive source only indexes a user’s
My Drive
content.
However, you can configure the source to index content from the user’s
Shared drives
as well, or exclusively from the
Shared drives
.
Check this box to index the items in the trash folder.
Custom properties
Check this box to include custom properties that Google applications or your custom applications added on items.
Including custom properties significantly increases communication traffic between the source and the Google Drive.
This, in turn, significantly increases indexing time.
"Content security" tab
Select who will be able to access the source items through a Coveo-powered
search interface
.
For details on this parameter, see
Content security
.
When you want to save your source configuration changes without starting a build/rebuild, such as when you know you want to do other changes soon, click
Add source
/
Save
.
When you’re done editing the source and want to make changes effective, click
Add and build source
/
Save and rebuild source
.
If you want to use a currently
not indexed
metadata in a facet or result template, map it to a field.
Click the metadata and then, at the top right, click
Add to Index
.
In the
Apply a mapping on all item types of a source
panel, select the field you want to map the metadata to, or
add a new field
if none of the existing fields are appropriate.
Depending on the source type you use, you may be able to extract additional metadata from your content.
You can then map that metadata to a field, just like you did for the default metadata.
More on custom metadata extraction and indexing
Some source types let you define rules to extract metadata beyond the default metadata Coveo discovers during the initial source build.
In the JSON configuration (
REST API
|
GraphQL API
) of the source, define metadata names (
REST API
|
GraphQL API
) and specify where to locate the metadata values in the JSON API response Coveo receives.
Some source types automatically map metadata to default or user created fields, making the mapping process unnecessary.
Some source types automatically create mappings and fields for you when you configure metadata extraction.
See your source type documentation for more details.
Link sharing and the "Same users and groups as in your content system" content security option
If your source has the
Same users and groups as in your content system
content security option enabled, a user sees a Google Drive file in their Coveo search results only if the user is authorized to access the file based on the file’s link-sharing setting in Google Drive.
In other words, if the file is shared with the user in Google Drive, the user will see the file in their Coveo search results.
Depending on a Google Drive file’s link-sharing settings, access is either:
When you set the link-sharing options for a folder in Google Drive, all files in the folder automatically inherit the folder’s link-sharing settings.
This means that if you set the link-sharing options for a specific file, and then set the options for the file’s folder, the file’s link-sharing settings change to match its folder settings.
Restrict access to searchable content only
If the link-sharing options for a Google Drive file is set to allow access to everyone in your organization, you can use the
OnlyIndexFilesSharedToDomainAndSearchable
source parameter in conjunction with the
People in [organization] can search for this file
link setting in Google Drive to index the file only if it’s set as searchable in Google Drive.
You can use this parameter, for instance, if you want to exclude a file from Coveo search results but make the file accessible in Google Drive.
By default, the
OnlyIndexFilesSharedToDomainAndSearchable
parameter value is set to
false
, which means that all shared files are indexed and appear in Coveo search results for everyone in your organization.
To restrict file access in Coveo search results only to files that are set as searchable in Google Drive:
However, if you need to configure your source so that the indexed source content is accessible to
Everyone
, you should adhere to the following leading practices.
These practices ensure that your source content is safely filtered and only accessible by the appropriate users:
Configure query filters
: Apply filter rules on a query pipeline to filter the source content that appears in search results when a query goes through that pipeline.
Use condition-based query pipeline routing
: Apply a condition on a query pipeline to make sure that every query originating from a specific search hub is routed to the right query pipeline.
Following the above leading practices results in a workflow whereby the user query is authenticated server side via a search token that enforces the search hub from which the query originates.
Therefore, the query can’t be modified by users or client-side code.
The query then passes through a specific query pipeline based on a search hub condition, and the query results are filtered using the filter rules.
You apply the
@objectType=="Solution"
query filter to the pipeline to which the traffic of your public support portal is directed.
As a result, the
@objectType=="Solution"
query expression is added to any query sent via this support portal.
Therefore, if a user types
Speedbit watch wristband
in the search box, the items returned are those that match these keywords and whose
objectType
has the
Solution
value.
Items matching these keywords but having a different
objectType
value aren’t returned in the user’s search results.
When using this routing mechanism, you ensure that search requests are routed to a specific query pipeline according to the search interface from which they originate, and the authentication is done server side.
When using query filters to secure content, the safest way to enforce content security is to authenticate user queries using a search token that’s generated server side.
For instance, when using this approach, you can enforce a search hub value in the search token. This makes every authenticated request that originates from a component use the specified search hub, and therefore be routed to the proper query pipeline.
Because this configuration is stored server side and encrypted in the search token, it can’t be modified by users or client-side code.
Implementing search token authentication requires you to add server side logic to your web site or application.
Therefore, the actual implementation details will vary from one project to another.
The following procedure provides general guidelines:
The
Edit all
privilege isn’t required to create sources.
When granting privileges for the
Sources
domain, you can grant a group or API key the
View all
or
Custom
access level, instead of
Edit all
, and then select the
Can Create
checkbox to allow users to create sources.
See
Can Create ability dependence
for more information.
View sources, view source update schedules, and subscribe to source notifications
Content
Fields
Sources
Organization
Organization
Edit sources, edit source update schedules, and view the
View and map metadata
subpage
Content
Fields
Sources
Content
Source metadata
Organization
Organization
1
. By default, the Google Drive for Work source indexes files of the
My Drive
folder for each user, but you can configure the source to index files only for specific users. You can also choose to index files in users'
Shared Drives
. Shared items are indexed with the associated permissions, so that whoever is authorized to see the items can find them in Coveo search results.
2
. The comments and replies are indexed in the
coveo.comments
and
coveo.comments.authors
metadata of their parent item rather than as separate items. This way, users can search for the content of a comment or reply and find the parent item.
Need help with our product? Please
open a support case
for expert assistance. Use this feedback option to comment on the article only.
Need help with our product? Please
open a support case
for expert assistance. Use this feedback option to comment on the article only.