ATG Search returns a list of results in the same structure as the query response. However, since there is one result per item and the matching text is replaced by the URL, no result grouping is possible. Normally, the results are sorted in relevance order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. This secondary sort does not affect what the final results are, just the order of the returned results. Secondary sorting is performed before paging. Secondary sorting is controlled by the following attributes:
<similardocs docSort="mode
" docSortOrder="order
" docSortProp="prop
"
docSortPropDefault="def
"
The mode
value specifies how the index items will be sorted, and can be one of the following:
relevance
– the default value, return items in relevance order, assuming the item set is a categoryalpha
– sort index items by filename (for example,index.htm
)address
– sort index items by web site address (for example,http://www.mycorp.com
)url
– sort index items by full URLdate
– sort index items by last modified datestrprop
– sort index item by a metadata string property, requiresdocSortProp
attributenumprop
– sort index items by a metadata number property, requiresdocSortProp
attributetitle
– sort index items by titletype
– sort index items by the type, such as HTML, PDFdocset
– sort index items by physical document setindex
– leave index items unsorted, in index order
The order
value determines whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode. The order
value should be either ascending
or descending
.
The prop
value specifies the property name to use for the strprop
or numprop
modes. The property name must be a valid property of the given type; that is, for strprop
, either string
or enum
, and for numprop
, either integer
, float
, boolean
or date
. Index items that don’t have this property will be excluded from the sort. To prevent that, the def
value can specify the default property value to use for these exceptional cases. The def
value should agree with the type of the property.