diff --git a/trove/vocab/trove.py b/trove/vocab/trove.py index e188e85bb..8ddae3db3 100644 --- a/trove/vocab/trove.py +++ b/trove/vocab/trove.py @@ -656,17 +656,21 @@ def trove_browse_link(iri: str): RDFS.comment: {literal('how to order search results', language='en')}, TROVE.jsonSchema: {literal_json({'type': 'string'})}, DCTERMS.description: {_literal_markdown(f'''**sort** is -a query param to control ordering of search results +a query param to control ordering of search results based on values of a specific type at a specific path. -accepts a short-hand iri for a date property: +to sort by date values, use `sort` (or `sort[date-value]`) with a **property-path** that ends with +one of the following supported date properties: {", ".join(f"`{osfmap_shorthand().compact_iri(_date_iri)}`" for _date_iri in DATE_PROPERTIES)} -prefix with `-` to sort descending (latest first), otherwise sorts ascending (earliest first) +to sort by integer values, use `sort[integer-value]` with a **property-path** to the integers of interest. + +by default, sorts "ascending" (beginning with earliest date or smallest integer) -- +prefix the value with `-` to sort "descending" (beginning with latest date or largest integer). if missing (or if `sort=-relevance`), results are sorted by some notion of relevance to the request's search-text or (if no search-text) by random. -may not be used with `page[cursor]` +may not be used with `page[cursor]`. ''', language='en')}, },