
Google Search Appliance: Search Protocol Reference Request Format 34
Combining Language Filters
Search requests that use the
lr
parameter support the Boolean operators identified in the following
table in order of precedence.
Note: Spaces are not valid characters in the collection string.
Internationalization
To support searching documents in multiple languages and character encodings, Google provides the ie
and oe parameters. The ie parameter indicates how to interpret characters in the search request. The
oe parameter indicates how to encode characters in the search results. To appropriately decode the
search query and correctly encode the search results, supply the correct ie and oe parameters,
respectively, in the search request.
Note: When you are providing search for multiple languages, Google recommends using
utf8
encoding
value for the ie and oe parameters.
Examples
Example 1. The following search request interprets the search query “gloves” using
latin1
encoding,
searches for English or French results, and returns results using
latin1
encoding:
GET /
search?q=gloves&client=test&site=test&lr=lang_en|lang_fr&ie=latin1&oe=latin1
Boolean Operator Sample Usage Description
Boolean NOT [ - ]
-lang_fr
Removes all results that are defined as
part of the Language Filter immediately
following the
-
operator. The example
lr
value would remove all results in
French.
Boolean AND [ . ]
gloves.hats
Returns results that are in the
intersection of the results returned by
the collection to either side of the dot
operator. The example
restrict
value
returns results which are in both the
“hats” and “gloves” custom collections.
Boolean OR [ | ]
lang_en|lang_fr
Returns results that are in either of the
results returned by the collection to
either side of the pipe operator (|). The
example
lr
value returns results
matching the query that are in either
French or English.
Parentheses [ ( ) ]
(gloves).(-(lang_hu|lang_cs))
All terms within the innermost set of
parentheses are evaluated before terms
outside the parentheses are evaluated.
Use parentheses to adjust the order of
term evaluation. The example
lr
value
returns all results in the “gloves” custom
collection that are not in either the
Hungarian or Czech collections.
Comentarios a estos manuales