beautypg.com

Controlling results with the search protocol, Manipulating search requests, Restricting searches – Google Search Appliance Getting the Most from Your Google Search Appliance User Manual

Page 68: Processing xml output, Useful knowledge for using the search protocol

background image

Google Search Appliance: Getting the Most from Your Google Search Appliance

Essentials

68

Controlling Results with the Search Protocol

The Search Protocol is an HTTP-based protocol that enables you to control how search results are
requested and presented to a user.

A search request is a standard HTTP GET command to the Google Search Appliance. The search
appliance returns results in either XML or HTML format, as specified in the search request. HTML-
formatted results can be displayed directly in a web browser.

XML-formatted output makes it possible to process the search results in web applications or other
environments.

The search protocol provides capabilities for:

“Manipulating Search Requests” on page 68

“Restricting Searches” on page 68

“Processing XML Output” on page 68

Manipulating Search Requests

Use search parameters in a search request to manipulate search results. Ways that you can use search
parameters to manipulate search results include:

Serving search results in XML without applying an XSLT stylesheet

Formatting search results by using an XSLT stylesheet associated with a specific front end

Limiting search results to the contents of a specified collection

Restricting Searches

Use query terms to restrict a search. Ways that you can use query terms to restrict searches include:

Restricting a search to pages that contain all the search terms in the anchor text of the page

Restricting a search to documents with modification dates that fall within a time frame

Restricting a search to documents containing a keyword in the title

Processing XML Output

XML-formatted output makes it possible to integrate the search results in various applications. Using
the Google XML results format, you can use your own XML parser to customize the display for your
search users.

Google XML results can be returned with or without a reference to the most recent DTD (Document
Type Definition) describing Google’s XML format. The DTD is a guide to help search administrators and
XML parsers understand the XML results output.

Useful Knowledge for Using the Search Protocol

To use the Search Protocol, you need a basic understanding of the HTTP protocol and HTML document
format.

To work with search results in XML format, you need a basic understanding of XML and XSLT.