Skip to main content

Web Service Method: Retrieve Facet Fields of Search Space

Abstract

Web Service Method: Retrieve Facet Fields of Search Space

Description

Retrieve details of facet field configurations of a search space.

URL: /api/context/fields

Request

Supported Methods

GET

HTTP Parameters

Parameter

Comment

Type

Required

searchSpaceId

ID of the search space

String

true

Response

Content Type

application/json

Response Attributes

A SearchFieldSetup object:

Attribute

Type

Required

Comment

contextSearchFields

Map of String

false

Search field by space

searchFields

Array of SearchField

false

Search field setup

Example Response of SearchFieldSetup
{
  "contextSearchFields" : { },
  "searchFields" : [ {
    "sortDirection" : "ASC",
    "field" : "some field",
    "searchFieldType" : "TYPELESS",
    "label" : "some label",
    "sortable" : false,
    "facet" : false
  }, {
    "sortDirection" : "DESC",
    "field" : "some field",
    "searchFieldType" : "INTEGER",
    "label" : "some label",
    "sortable" : true,
    "facet" : false
  } ]
}

A SearchField object:

Attribute

Type

Required

Comment

facet

boolean

false

Field used as facet

field

String

false

Field name

label

String

false

Field label

searchFieldType

SearchFieldType

false

Field type TEXT | LITERAL | INTEGER | LONG | FLOAT | DATE | DATETIME | BOOLEAN | RESOURCE | TYPE | TYPELESS

sortDirection

SortDirection

false

Field sort direction DESC | ASC

sortable

boolean

false

Field is sortable

Example Response of SearchField
{
  "sortDirection" : "DESC",
  "field" : "some field",
  "searchFieldType" : "TYPE",
  "label" : "some label",
  "sortable" : true,
  "facet" : true
}