The request
variable describes the current search. It is only available in the Search results designer.
The structure of request
is as follows:
{
"query": "API",
"filters": [
{
"key": "Category",
"values": [
"Reference Guides"
],
"negative": false
}
],
"facets": [
{
"id": "Category"
},
{
"id": "Version_FT"
},
{
"id": "audience"
},
{
"id": "Platform"
},
{
"id": "ft:sourceName"
},
{
"id": "rn_product"
},
{
"id": "rn_type"
},
{
"id": "language"
},
{
"id": "FT_Version"
}
],
"sort": [
{
"key": "afs:relevance",
"order": "DESC",
"type": "ALPHA"
},
{
"key": "ft:isPublication",
"order": "DESC",
"type": "ALPHA"
},
{
"key": "ft:isArticle",
"order": "ASC",
"type": "ALPHA"
},
{
"key": "ft:title",
"order": "ASC",
"type": "ALPHA"
},
{
"key": "ft:lastEdition",
"order": "DESC",
"type": "ALPHA"
}
],
"paging": {
"page": 1,
"perPage": 20
},
"contentLocale": "en-US",
"virtualField": "EVERYWHERE",
"scope": "DEFAULT"
}
Field | Type | Description |
---|---|---|
query |
String | The string entered by the user. |
filters |
Array | An array containing the currently selected filters. |
key |
String | The name of the metadata key that contains the filter value selected by the user. |
values |
String | The selected metadata key values used to filter results. |
negative |
Boolean | When true , the results matching the previously set values are excluded. By default, the negative parameter is false . |
facets |
Array | The filters available to the user at the time of the search. |
id |
String | The name of a metadata key in the available facets. |
sort |
Array | Describes the method of sorting documents in a search. The values in the example above are the default values in Fluid Topics. |
key |
String | The name of the metadata key used to sort documents. |
order |
String | Can be ASC (ascending) or DSC (descending). |
type |
String | Can be ALPHA (Lexicographic order) or NATURAL (natural sort order). |
paging |
String | Information about the search results paging. |
page |
Number | Indicates the current search results page. |
perPage |
Number | Indicates the number of search results on a single page of results. |
contentLocale |
String | The current search's language ISO code. |
virtualField |
String | Defines whether to search in all content (EVERYWHERE ) or in document titles only (TITLE_ONLY ). |
scope |
String | Restricts the type of results. Can be DEFAULT (results are of TOPIC , MAP , or DOCUMENT type), DOCUMENTS (results are of MAP or DOCUMENT type), or ALL_TOPICS (results are of TOPIC type). |