beautypg.com

Search request examples (post command) – Google Search Appliance Protocol Reference User Manual

Page 9

background image

Google Search Appliance: Search Protocol Reference

Request Format

9

Example 2. This request returns results numbered 11-15 that match the same query terms and
collection as example 1. As specified by the proxystylesheet parameter, the results are rendered in
the custom HTML output format defined by the front end named “test.”

GET /search?q=bill+material&start=10&num=5&output=xml_no_dtd&proxystylesheet=
test&client=test&site=operations HTTP/1.0

Explanation:

This search request uses the same search query terms and collection as in Example 1.

GET /search?q=bill+material&start=10&num=5&output=xml_no_dtd&proxystylesheet=
test&client=test&site=operations HTTP/1.0

Results numbered 11–15 are returned.

GET /search?q=bill+material&start=10&num=5&output=xml_no_dtd&proxystylesheet=
test&client=test&site=operations HTTP/1.0

Results are returned in custom HTML output format, which is created by applying the XSL stylesheet
associated with the “test” front end to the standard XML results. See “proxystylesheet” on page 18.

GET /search?q=bill+material&start=10&num=5&output=xml_no_dtd&proxystylesheet=
test&client=test&site=operations HTTP/1.0

Example 3. This request returns the first 10 German results that match the search query “Star Wars
Episode +I”:

GET /search?q=Star+Wars+Episode+%2BI&output=xml_no_dtd&lr=lang_de&ie=
latin1&oe=latin1&client=test&site=movies&proxystylesheet=test HTTP/1.0

Explanation:

The search query term is “Star Wars Episode +I”. Search is limited to documents in the “movies”
collection.

GET /search?q=Star+Wars+Episode+%2BI&output=xml_no_dtd&lr=lang_de&ie=
latin1&oe=latin1&client=test&site=movies&proxystylesheet=test HTTP/1.0

Results show the first 10 German results.

GET /search?q=Star+Wars+Episode+%2BI&output=xml_no_dtd&lr=lang_de&ie=latin1&oe=
latin1&client=test&site=movies&proxystylesheet=test HTTP/1.0

Results are returned in Google custom HTML output format, which is created by applying the XSL
stylesheet associated with the “test” front end to the standard XML results.

GET /search?q=Star+Wars+Episode+%2BI&output=xml_no_dtd&lr=lang_de&ie=latin1&oe=
latin1&client=test&site=movies&proxystylesheet=test HTTP/1.0

Search Request Examples (POST command)

The following examples show search requests that use the POST command for public search only. The
POST command should have a target to search:

POST /search HTTP/1.0

The query string payload is not part of the header; it appears in the body of the request. The following
examples show query strings. Take note that line breaks are used for readability only and should not be
present in actual code.