Set Searchable Metadata Fields
post
/documents/api/1.1/metadata/searchFields
Turn search on for a list of metadata fields. Only metadata fields from the same global collection can be processed in the same request.
Currently, there is a limit of 100 searchable metadata fields, and after that point no extra fields can be indexed. You must log in as an administrator. Searchable metadata fields can be used by all tenant users.
Request
Supported Media Types
- application/json
- application/xml
Body Parameter
The request body defines the details of setting searchable metadata fields.
Root Schema : SetSearchableMetadataRequestBody
Description of fields available to set searchable metadata fields.
- collection
-
Type:
string
Required:true
Metadata collection name. - fields
-
Type:
string
Required:true
Comma-separated list of metadata fields to be set as searchable.
Example application/json
{
"collection":"SearchableCollection",
"fields":"searchField1,searchField2,searchField3"
}
Response
Supported Media Types
- application/json
- application/xml
200 Response
The request was fulfilled.
Body
The response body confirms if the request was successful.
Root Schema : SetSearchableMetadataResponse
The response body confirms if the request was successful.
- errorCode
-
Type:
number
An error code of zero (0) indicates no errors.
400 Response
Request parameters are not formatted correctly.
403 Response
Exceeded number of allowed searchable metadata fields.
404 Response
Collection or field does not exist.
Examples
The following example makes a few metadata fields available for search purposes.
POST .../metadata/searchFields
Request Header
None.
Request Body
{ "collection":"SearchableCollection", "fields":"searchField1,searchField2,searchField3" }
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{ "errorCode": "0" }