JSON OpenSearch Output Feed - AFS

AFS Integration Guide

Reference Guide

The basic component of an acp output feed is an OpenSearch compatible list of elements:

  • The first element in the list contains the query.
  • The second element is the list of replies.

In JSON, opening and closing square brackets delimit lists. Commas separate list items, and character strings are delimited by quotes. When completion is unavailable, the second list is empty.

The acp output feed uses this OpenSearch syntax when and only when one of the conditions is met:

  • The completion server works on a single completion feed — in which case there is no ambiguity about which feed replied.
  • A single afs:feed parameter has been used in the query — in which case the feed which replied is the feed selected in the query.
  • None of the feeds produced a completion.

The following lines are a JSON OpenSearch output feed example:

[ "query" , ["completion1", "completion2"…] ]
[ "queryWithoutCompletion" , [] ]