beautypg.com

Exclusion, File extension filtering, File extension exclusion – Google Search Appliance Protocol Reference User Manual

Page 26

background image

Google Search Appliance: Search Protocol Reference

Request Format

26

The URLs used with site must contain fewer than 119 characters. The exclusion operator (-) can be
applied to this to remove a web directory from consideration in the search. You can specify one site
term per search request or multiple site terms using the Boolean OR operator.

The search request parameters as_sitesearch (see “as_sitesearch” on page 13) and as_dt (see “as_dt”
on page 10)
can also be used to submit directory restricted searches. See also the site parameter (see
“site” on page 19).

Sample usage:

Domain search examples:

site:www.google.com
site:google.com
site:com

Directory search examples:

admission site:www.stanford.edu/group/uga
site:www.google.com/enterprise/
site:www.google.com/about
gxp site:www.corp.google.com/eng/howto OR site:www.corp.google.com/eng/doc

Exclusion

Sometimes what you’re searching for has more than one meaning. For example, the term “bass” can
refer to either fishing or music. You can exclude a word from your search by putting a minus sign (-)
immediately in front of the term you want to exclude from the search results. Be sure to include a space
before the minus character.

The search request parameter as_eq (see “as_eq” on page 11) can also be used to submit terms to
exclude.

Sample usage:

bass -music

File Extension Filtering

The query prefix ext: filters the results to include only documents with the specified file extension. No
spaces can come between ext: and the type. For example, ext:pdf, which retrieves all documents with
the pdf extension.

You can combine this prefix with the filetype prefix to construct the following types of query :
filetype:pdf AND ext:pdf, which retrieves all documents with the Mime type pdf and with the pdf
extension.

You can exclude file types by putting a minus sign before ext, such as -ext:pdf. For more information,
see “File Extension Exclusion” on page 26.

Sample usage:

whitepaper ext:doc OR ext:pdf

File Extension Exclusion

The query prefix-ext: filters the results to exclude documents with the specified file extension. No
spaces can come between -ext: and the specified extension.