Query Management - AFS

Antidot Product Architecture

Product
AFS
AFS_Version
7.9
Category
Reference Guide

AFS operates search services accessible with a URL from any application able to issue an HTTP request (browser, specific application, web requester, and so on).

The following web form example exhibits the method to call the AFS engine and the search, sort, and filter parameters. The parameters to call the engine may be as follows:

  • User query parameters, like afs:query for the words to search (for example, afs:query=form+tax)
  • Specific parameters for a service:
    • afs:service for the search service (several search services can be declared independently)
    • afs:skin for the applicable XSL style sheet
    • afs:replies for the number of replies per page, and afs:page for the requested reply page number
  • Parameters to filter, sort, and group replies:
    • afs:cluster to group replies according to a field value, like for the different values of a topic (for example, afs:cluster=COUNTY,5 to group the replies according to the county category and to display the first five replies for each county)
    • afs:sort to sort results according to one or more fields in the ascending or descending order (for example, afs:sort=date|ASC-afs:relevance|DESC to first sort results in ascending date order, then to sort results of the same date in relevance descending order)
    • afs:filter to define advanced filtering processes and associate them with different search fields (for example, afs:filter= ((COUNTY='Devon') OR (PROFILE='individual'))

Calling the engine means sending those parameters in the call URL:

http://search.mysite.com/search?afs:service=20035&afs:output=xml&afs:query=form+tax&afs:filter=(COUNTY="Devon")&afs:sort=date|ASC

The parameters themselves are defined in the search form included in the calling web page:

<form name="request" action="search.mysite.com/search">
<input type="hidden" name="afs:service" value="20035"/>
<input type="hidden" name="afs:sort" value=date|ASC"/>
<input type="text" size="30" name="afs:query"/>