External metadata stored in a database, Scenario 1 – Google Search Appliance External Metadata Indexing Guide User Manual
Page 6

Google Search Appliance: External Metadata Indexing Guide
6
External Metadata Stored in a Database
There are three scenarios for indexing external metadata that is stored in a database, depending on
how your primary document is referenced and stored. For each of these scenarios, the search appliance
indexes a meta name for each field in your crawl query and meta content for the value in that field.
If you want to use an alias for a field name, you can use the SQL keyword AS in the crawl query to give
the field a more meaningful name. For example, if your database has an auth field, you might prefer to
give the field an alias of author, because author is a more common search term. Your users could then
search for this document by adding &requiredfields=author to their search query URL. Creating
aliases for obscurely named fields is especially useful if you want to collect values for the
requiredfields or partialfields parameters from your end users.
When using the SQL keyword AS to create an alias for a field, use the alias (instead of the original field
name) for the following fields on the Content Sources > Databases page:
•
Document URL Field
•
Document ID Field
•
Base URL
•
Primary Key Fields
•
BLOB MIME Type Field
•
BLOB Content Field
Scenario 1
Metadata: Stored in a database.
Primary Document: A valid URL stored in a single field in the same database that references the
primary document.
If your external metadata is stored in a relational database and one of the fields contains fully qualified
URLs that reference primary documents, use the following steps to enable external metadata indexing:
1.
In the Content Sources > Databases page, create a new database data source.
2.
Enter the database properties (type, hostname, port, name, username, password) used to connect
to the database that contains the external metadata.
3.
Construct the Crawl Query, which is a valid SQL statement accepted by the target database that
returns all rows of metadata to be indexed. One of the indexed fields must contain the full URI that
references the primary document.
4.
Under Data Display / Usage, select the Metadata option.
5.
Select the Document URL Field option, and enter the name of the database column (field name)
that holds valid URLs that reference the primary documents.