afsDefaults - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.7
Category
Reference Guide

This object is used to store parameters applied to all queries. Parameters set here override parameters set in AFS Front Configuration.

List of possible parameters:


Parameter Name


Card.


Type


Default


Description

afs:service

Optional

Integer

0

The service ID of the search service.

afs:status

Optional

String

stable

The service status of the search service.

afs:query

Optional

String

""

The default keywords to use. See Keywords Widget.

afs:key

Optional

String

""

The auth key to use.

afs:feed

Optional

String

N/A

The feed to display.

afs:lang

Optional

String

en

The lang used for the search service.

afs:log

Optional

String

N/A

The log used for queries.

afs:replies

Optional

Integer

20

Default max replies per page. See PageSize Widget.

afs:sort

Optional

String

afs:relevance,DESC

Default replies sort order. See Sort Widget.

afs:facetDefault

Optional

String

replies=1000

Maximum facet values.

afs:facetOrder

Optional

String

N/A

When set, AFS only output facets from this list, and in this order.

afs:cluster

Optional

String

N/A

Enables the cluster mode. The syntax is facetId,maxItems.

afs:overspill

Optional

Boolean

N/A

In cluster mode, enables overspill mode. In this mode, replies that could not be fitted in clusters are added, in sorted order, to a reply set after all clusters.

afs:count

Optional

String

N/A

Allows to indicate if afs:replies works on documents or clusters.

others

Optional

String

N/A

All other wanted parameters.

The others property allows to force extra parameters. When adding parameters in the others field, the following limitations apply:

  • parameters must be written in classic query string
  • classic query string must be properly URI encoded
  • no validity check is performed!

Example:

afs%3Afacet=%28Foo%2CBar%29%2Csort%3Dalpha&afs:%3Afacet=%28Foo%2CBar%29%2Corder%3DDESC

Example (with default values) :

{
"afsDefaults": {
"afs:service": 0,
"afs:status": "stable",
"afs:lang": "en",
"afs:log": "",
"afs:replies": 20,
"afs:sort": "afs:relevance,DESC",
"afs:facetDefault": "replies=1000",
"others": ""
}
}