afs:filter - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Role

Sets the search filter (facets, or other). The filter values must obey the predicate grammar.

For more information, see Other Parameters.

Status

Optional. It may be set several times (in which case all filters are evaluated in an "and" fashion).

The available operators are: and, not, and or (must be in lower case).

Examples

afs:filter=price<100

afs:filter=author="Shakespeare"

afs:filter=a>b&afs:filter=c<d is equivalent to afs:filter=(a>b)and(c<d)

afs:filter=myFilter=[1 .. 9] is equivalent to afs:filter=myFilter>=1 & afs:filter=myFilter <=9 and is also equivalent to afs:filter=myFilter>=1 and myFilter <=9

afs:filter=(category=a or category=b)will show the results of the union of facets category a and category b.

afs:filter=not(category=a) will hide results with a value a for facet category.

afs:filter=date="2012-12-12" will show results for this day.

afs:filter=date=["2012-12-12" .. "2012-12-21"[ will show results for this interval.

afs:filter=date="2012-01" is equivalent to afs:filter=date=["2012-01-01" .. "2012-02-01"[ and will show result only for this month.

For the afs:filter=date parameter, square brackets ("[" and "]") can be both inclusive and exclusive. This means that the following intervals will not return the same results:

afs:filter=facet_date_id=]"2012-12-12" .. "2012-12-21"[

returns results dating from between 2012-12-12 not included and 2012-12-21 not included.

afs:filter=facet_date_id=["2012-12-12" .. "2012-12-21"]

returns results dating from between 2012-12-12 included and 2012-12-21 included.