
Google Search Appliance: Search Protocol Reference Request Format 43
If any of the results contain the
author
,
title
or
keywords
meta tags, then the values of those meta
tags are returned with the respective results. For example, the following tags could be returned with this
search request:
<meta name="author" content="Jakob Nielsen">
<meta name="title" content="Usability Engineering">
<meta name="keywords" content="Usability, User Interface, User Feedback">
Details
To specify multiple meta tag values to be returned, list all meta tag names separated by a period (
.
) as in
the first example. To request all available meta tags for each search result, specify an asterisk (
*
) as the
value for the
getfields
parameter.
When meta tag values are requested, they are not displayed in results requested in the default HTML
format. You can use the custom HTML or XML output options, or set the XSLT variable
show_meta_tags
to display meta tags in results. For more information, see “Advanced Customization Topics” in Creating
the Search Experience.
All specified meta tag names and values must be double URL-encoded (see “Appendix B: URL Encoding”
on page 107).
Filtering by Meta Tags
The search appliance can filter results by the values of the results’ meta tags. This section describes how
to use the
requiredfields
and
partialfields
input parameters to filter results using meta tag
values. You can use these parameters to include only search results that contain specified meta tag
values.
The term
partialfields
refers to part of the meta tag content, rather than part of a word. For
information on other filtering techniques, see “Filtering” on page 30.
You can use the operators in the following table when filtering by meta tags.
A search can be performed to find all documents containing a set of words and/or metadata, such as A
AND B AND C. These terms can also be negated, such as A AND B AND NOT C. The search appliance can
also use OR conditions for querying.
Usage
GET /search?q=[search term]&output=xml
&client=test
&site=test
&requiredfields=[meta tag name]:[meta tag content]
The
q=
parameter is optional when using
requiredfields
or
partialfields
parameters, however,
the whole query needs to have at least one positive term, be it part of the query or in the metadata
restricts.
Operator Description
AND (
.
) Include results when both filters are true.
OR (
|
) Include results when at least one filter is true.
NOT (Exclusion) (
-
) Exclude from the result set any results that contain the specified meta
tag condition.
Comentarios a estos manuales