beautypg.com

Sort by metadata – Google Search Appliance Protocol Reference User Manual

Page 37

background image

Google Search Appliance: Search Protocol Reference

Request Format

37

Example

The following request returns the first 10 top results that match the query “chicken teriyaki” in the “test”
collection:

GET /search?q=chicken+teriyaki&output=xml&client=test&site=test&sort=date:D:S:d1

Results are sorted by date and relevancy.

Details

To sort the results by date, include the sort parameter in the search request, formatted as follows:

date:::

The following tables shows the possible values for , , and .

Sort by Metadata

The Google Search Appliance can order search results by values that are included in individual
documents. This makes it possible to sort documents by prices, dates, authors, or any other value that
is relevant for your documents. The sorting occurs only on the 1000 most relevant results for the
specific query.

When sorting by metadata, the total length of the metadata attr:value pair cannot exceed 121
characters. Exceeding the maximum character limit causes results to be unsorted. For more
information, see “Meta Tags” on page 41.

When using the sort-by-metadata feature, the automatic quality filter sometimes re-orders results when
performing result grouping. This can be disabled by adding the filter=0 parameter to the search request
when performing search by date.

Using this feature will cause search performance to decrease. The performance decrease depends on,
but is not limited to, the following factors

How many results are returned

Value

Description

A

Sort results in ascending order.

D

Sort results in descending order.

Value

Description

S

Return the 1000 most relevant results, sorted by date.

R

Get all results, sort by date, and return the first 1000 results. You can use this
option when freshness is more important than relevancy. Do not use this filter if
your collection contains more than 50,000 documents.

L

Return the date information for each result. No sorting is done.

Value

Description

d1

The format of the value returned for each search result is set to YYYY-MM-DD.