Specifying and calling a provider, Using an internal provider, Using an external provider – Google Search Appliance OneBox for Enterprise Developers Guide User Manual

Page 11

Advertising
background image

Google Search Appliance: Google OneBox for Enterprise Developer’s Guide

11

The regular expression (?i)([a-z]+) airport(?: (?:status|delays?|conditions))?
matches queries such as the following:

lax airport conditions

SFO airport delays

newark airport status

A regular expression provides great flexibility, but you must ensure that a search appliance rapidly
evaluates the expression so as not to degrade performance during searches. Note that the regular
expression language used by OneBox triggers is not the same as the Google regular expressions that a
search appliance uses for URL patterns.

Specifying and Calling a Provider

A OneBox provider can be internal or external. An internal provider is a collection on a search
appliance. An external provider is an application outside a search appliance.

Using an Internal Provider

To use an internal provider, specify the <collection> element (see the element “collection” on page 24)
and use the name of the collection as defined on a search appliance. The following example specifies an
internal provider using the InternalNews collection for the news trigger:

<onebox type="internal">

<name>news</name>
<description>This sample OneBox queries an intranet news source</description>
<trigger triggerType="keyword">news</trigger>
<collection>InternalNews</collection>
<resultsTemplate></resultsTemplate>

</onebox>

Using an External Provider

To specify an external provider, use the <providerURL> element (see the element “providerURL” on
page 24)
to specify the location of an external provider with the following guidelines:

For standard providers, use a fully qualified URL such as:

http://server.mydomain.com:port/directory/...

For secure providers, use a fully qualified secure (HTTPS) URL such as:

https://secure.server.mydomain.com:port/directory/...

The following example specifies Acme.com as the external provider for the directory trigger:

<onebox type="external">

<name>directory_example</name>
<description>This sample OneBox queries a phone directory</description>
<security userAuth="none"/>
<trigger triggerType="keyword">directory</trigger>
<providerURL>http://directory.corp.acme.com/cgi-bin/phonebook</providerURL>
<resultsTemplate>{xslt template} <resultsTemplate/>

</onebox>

Advertising