Set Searchable Metadata Fields
/documents/api/1.2/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 200 searchable metadata fields, and after that point no extra fields can be indexed. These metadata fields and metadata collections will be removed from the search index if an administrator deletes them. This action will lower the number of indexed metadata fields allowing users to index new ones.
You must log in as an administrator. Searchable metadata fields can be used by all tenant users.
Request
- application/json
- application/xml
object
-
collection:
string
Metadata collection name.
-
fields:
string
Comma-separated list of metadata fields to be set as searchable.
{
"collection":"SearchableCollection",
"fields":"searchField1,searchField2,searchField3"
}
Response
- application/json
- application/xml
200 Response
The request was fulfilled.
object
-
errorCode(optional):
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" }