sort and order - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Role

Sorts the facet values, in ascending or descending order, according to:

  • Alphabetical order
  • Number of replies for each value
  • User specific order (see parameter afs:sortKey, AFS Configuration Guide)

Status

Optional. When unset, facet values are sorted alphanumerically.

Type

Boolean

Example

Sorting by descending number of replies:

afs:facetDefault=sort=items&
afs:facetDefault=order=DESC

Sorting alphabetically ascending:

afs:facetDefault=sort=alpha&
afs:facetDefault=order=ASC

Sorting facet Foo in ASCII order with user specific criteria (sortKey):

afs:facet=Foo,sort=alphaKey&

Sorting facet Foo in numerical order with user specific criteria (sortKey):

afs:facet=Foo,sort=numKey&

Sorting facets Foo and Bar alphabetically descending, overriding default:

afs:facet=(Foo,Bar),sort=alpha&afs:facet=(Foo,Bar),order=DESC

Details about sort=numKey and sort=alphaKey

Example: for a result set containing a facet f with three values, f1 (sortKey=2), f2 (sortKey=4) and f3 (sortKey=10).

  • The sort order with sort=numKey is numerical: f1 (sortKey=2), f2 (sortKey=4), f3 (sortKey=10).
  • The sort order with sort=alphaKey is alphabetical: f3 (sortKey=10), f1 (sortKey=2), f2 (sortKey=4).

Sort and order apply to hierarchical string facets.