beautypg.com

Date range search, Directory restricted search – Google Search Appliance Protocol Reference User Manual

Page 25

background image

Google Search Appliance: Search Protocol Reference

Request Format

25

Date Range Search

Restrict search to documents with modification dates that fall within a time frame. You can search any
dates between 1900-01-01 and 2079-06-06. For a complete list of date formats, see “Acceptable Date
Formats” on page 109
.

Date range searches by themselves do not return results and must be accompanied by a search term.

Only documents that have a modification date are returned for a daterange query. Documents that do
not have modification dates are excluded from the results.

To specify dates in ISO 8601 format (such as YYYY-MM-DD), use two dots (..) to separate dates in the
date range. For example, to search for documents that contain the word parrot and were modified
between August 1, 2008 and December 24, 2008, enter the following statement:

parrot daterange:2008-08-01..2008-12-24

You can specify that a search be for all modification dates before a date by preceding the date with the
two dots. For example, to search for all documents containing parrot that were modified before August
8, 2008, specify the date range with the following statement:

parrot daterange:..2008-08-08

You can specify that a search be for all documents that were modified after a specific date by specifying
a date followed by two dots. For example, to search for all documents that were modified after January
1, 2009 that contain parrot, specify the date range with the following statement:

parrot daterange:2009-01-01..

To specify how a search appliance sorts search results by document dates, use Index > Document
Dates in the Admin Console. You can sort search results by the dates found in a document’s URL, a meta
tag, the title, the body, or when the document was last modified. If you choose to sort by a meta tag, the
meta tag that you specify can contain only a date.

Dates in Julian format can be treated as a date range only with the daterange keyword. Without the
daterange keyword, Julian dates are considered a number range search. (A Julian date is an integer
number of days that have elapsed since noon on January 1, 4713 BC. For example, August 1, 2008 at
noon has a Julian date of 2454680.)

For further options for searching dates in meta tags, see “Using inmeta to Filter by Meta Tags” on
page 47.

Sample usage:

election daterange:2008-01-20..2009-01-20
election daterange:2008-01-20..
election daterange:..2009-01-20
parrot daterange:2452122-2452234

Directory Restricted Search

Restrict search to documents within a domain or directory. Enter the query followed by site: followed
by the host name and path of the web directory. To limit the search to a domain, specify a string that
matches a complete name-segment of the canonical host name.

To search a particular directory on a web server (including the root directory), specify a string that is the
complete canonical name of the host server followed by the path of the directory. If the forward slash
character (/) is at the end of the web directory path specified, then search is limited to the files within
that directory. Files in sub-directories are not considered.