Modify Attributes of a Collection Using PUT

Use the PUT method to modify one or more attributes of a collection in a Solr cluster in Managed Search. The operation is atomic; either all attributes are updated or none of them are (if the operation fails).

Note
This topic describes how to edit a collection in Managed Search using the API. For instructions using the UI, see Manage Collections in Managed Search UI.

Request

Send an HTTP request with these elements.

Element Description

Method

PUT

Endpoint

{collection-id-endpoint}

Request header fields

Request header fields specify metadata for the request. For example, the Authorization header contains the OAuth2 access token.

Message body

JSON object that specifies the collection attributes that you want to modify, as well as all other collection attributes (the attributes that aren’t changing).

Collection attributes

You can modify these attributes of a collection in a Solr cluster after its creation.

Attribute Type Required? Description

autoscaling

object

no

JSON object that indicates whether to enable autoscaling, as well as autoscaling properties

nodeCount

integer

no

Number of Solr nodes

nodeType

string

no

Type of each Solr node

storageSizeGB

integer

no

Storage size in gigabytes to allocate for the Solr cluster

description

string

no

Description of the cluster

maintenanceTimeFrame

string

no

Timeframe for routine cluster maintenance

All attributes are optional. The command must specify one or more attributes.

Response

A response from a request to modify multiple attributes of a collection in a Solr cluster contains these elements.

Element Description

Status line

The status line contains the status code and the reason phrase.

Response header fields

Response header fields specify metadata about the response.

Message body

JSON object that specifies the modified values of the collection attributes.

Example

Request:

curl -XPUT "https://pg01.us-west1.cloud.lucidworks.com/managed/api/customers/lucidworks/clusters/jeff-1" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer accessTokenManagedSearch" -d '{"nodeCount": 4, "nodeType": "standard.large", "storageSizeGB": 50, "description": "a changed temporary cluster", "maintenanceWindow": "SUNDAY,07:30:00"}'