Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Document Properties Marker
overridefalse
Short DescriptionDocuments the use of the Sort Key Property of search macros.
 

Doctypedocmodulehide
NameSort By Property
 

Parent
Parent Property
property-nameName
 

Audience
Name List
doctyperole
render-no-hits-as-blanktrue
propertyAudience
 

Categories
Name List
doctypecategory
propertyCategories
 

Tags
Tag List
propertyTags
 

Iteration
Iteration
valuefinished
hide
Type
Name List
doctypemodule-type
render-no-hits-as-blanktrue
propertyType
 

Sort Keyhide
Section
titleDescription

Section
titleContent
Section
level2
titleSort By

The comma-separated list of document property names to use for sorting.

Section
level3
titleSort Order

Add a '+' (default) for ascending, a '-' for descending order.

Section
titleSort Directives

Since version 2.0 the following directives are available to control the sort order. Directives cannot be used together with other sorting strategies.

DirectiveDescriptionSyntax
Breadth First

A breadth first sort of a page tree.

Note that all documents in the result set must have a common ancestor.

#BREADTH_FIRST
Depth First

A depth first sort of a page tree.

Note that all documents in the result set must have a common ancestor.

#DEPTH_FIRST

There are three different implementations to choose from. Per default the Memory Implementation is used.

ImplementationDescriptionSyntax
No MemoryThe sorter does not use additional memory to speed up sorting.#BREADTH_FIRST:no-mem
#DEPTH_FIRST:no-mem
Memory

The sorter uses additional memory to store intermediate results for reuse. This speeds up the sorting process for larger result sets.

This is the default implementation.

#BREADTH_FIRST:mem
#DEPTH_FIRST:mem
#BREADTH_FIRST

#DEPTH_FIRST

MaterializeThe sorter materilizes the complete subtree and stores it for lookups. This is typically the fastest sorter, but requires to know the root node in advance.#BREADTH_FIRST:mat:{root page ID}
#DEPTH_FIRST:mat:{root page ID}
Section
titleArtificial Properties

The projectdoc Toolbox provides a number of artificial properties, some of which may be helpful for sorting.

Property NameExample Value
Creation Date§20151008
Creation Timestamp0000001444337808000
Last Modification Date§20170429
Last Modification Date Timestamp0000001493416800000
Section
level3
titleType Conversion

Add a type descriptor of the form

Code Block
languagetext
@{type/pattern}

The type is mandatory if the additional type descriptor is given. Valid values are

  • date
  • number

The pattern is optional to define a parsing pattern for the specified type.

Per default the sort key then the name of the document is used.

The last modification date is the last arbiter if all other properties are equal.

Example Box

Here are some examples

Sort ByThe sort order is defined by the ...
Name-... alphanumerical order of names, descending.
Calendar Week@{number}... numerical order of the calender week, ascending.
Date of Birth-@{date}... date of birth, descending.
Date of Birth@{date/dd.MM.yyyy}... date of birth, using the defined date pattern.
Section
titleSubordinate Modules
Display Table
doctypedocmodule
render-no-hits-as-blanktrue
selectName, Short Description
restrict-to-immediate-childrentrue
sort-bySort Key, Name

...