RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Get Started with Google OneBox for Enterprise : Page 2

Google OneBox for Enterprise is an API from the Google Search Appliance suite that uses well-tested aspects of Google's search technologies to serve intelligent, real-time information from enterprise systems.

OneBox Modules
A conceptual abstraction of searchable information in Google OneBox for Enterprise is called a "module." A module is defined by the following primary components:

  • Module Name, Type, and Description—Reference information for the module. The module type must be defined as either "internal" or "external." Internal modules gather information directly from the Google Search Appliance. External modules gather information from external sources, specified by a provider URL.
  • Trigger—Keywords or search expression that will invoke data collecting by the module. For example, the following code defines a trigger instigated by the keywords: directory, dir, contact, and/or phone:
  •    <trigger triggerType="keyword">
  • Provider URL—URL of entity responsible for resolving a data query. For example, the following defines a provider named SampleNoAuthOneBoxProvider, available at localhost, port 8080:
  •    <providerURL>
  • Security—An optional specification of authentication parameters and rules. For example, the following defines basic user-name and password authentication rules:
  •    <security userAuth="basic">
  • Results Template—An optional XSLT template definition to be used to transform query results
Google and its partners offer many pre-built OneBox modules that offer easy access to many common enterprise data sources, but Google provides an API that lets you build your own OneBox modules. For example, the following code defines a simple external module definition named my_onebox_example that's accessible at http://localhost/onebox/foobarsearch, requires no authentication, is triggered by the keyword foobar, and provides no XSLT results template:

   <onebox type="external">
         This is a simple external OneBox module
      <security userAuth="none"/>  
      <trigger triggerType="keyword">
The schema document onebox.xsd defines complete details for module definitions.

The Google OneBox for Enterprise SDK contains sample code, documentation, and the libraries you need to build OneBox modules for the Google Search Appliance. The SDK also contains a Python-based Google Search Appliance simulator for Enterprise OneBox.

For Java developers, Google offers the OneBox Servlet Starter Kit to enable integration with Google OneBox for Enterprise and Google Search Appliance using standard Java and Java EE technologies.

Installing Google OneBox for Enterprise
The OneBox Servlet Starter Kit provides components and libraries that enable integration with Google OneBox for Enterprise using a Java servlet-based API. The kit offers a Web application archive (WAR) that can be deployed immediately to any Java EE application server and serve sample OneBox-compliant data to Google Search Appliance or appliance simulator. The kit includes source code, Javadoc, and scripts to simplify the learning curve for developing custom OneBox modules and information providers.

After downloading and installing the OneBox Servlet Starter Kit, you can follow these five steps to see results immediately in Google Search Appliance or in the appliance simulator:

  1. Deploy onebox.war to your Java EE application server
  2. Modify the element of the onebox.xml module definition file to point to the onebox.war context within your application server
  3. Install the onebox.xml module definition file into Google Search Appliance or appliance simulator
  4. Start your Java EE application server
  5. Run some sample queries that will instigate triggers defined in the OneBox module definition to see sample results
I'll discuss these steps discussed in detail in the following sections. First, however, the Google Search Appliance simulator supplied as part of the Google OneBox for Enterprise SDK warrants a discussion.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date