Each returned item set may contain index items, depending on the other search parameters. Normally, the index items are returned in index order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. The index item sorting is controlled by the following attributes:
<browse 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, (such asindex.htm
)address
– sort index items by the beginning of the full URL (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 or 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 can 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; for example, 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.