Collections API

Use the Collections API to manage collections:

  • Create a Solr collection.

  • List all collections in a Solr cluster.

  • Delete a Solr collection.

Create a collection

Create a collection in a Solr cluster in Lucidworks Managed Search.

Request

Send an HTTP request with these elements.

Element Description

Method

POST

Request URI

https://cloud.lucidworks.com/managed/api/customers/customerId/clusters/clusterId/collections

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 attributes needed when creating a collection

Response

A response from a request to create 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 information about the response.

Message body

JSON object that specifies the taskId and the status of the request.

Example

curl -XPOST "https://cloud.lucidworks.com/managed/api/customers/lucidworks/clusters/jeff-1/collections" -H "Content-Type: application/json" -H "Authorization: Bearer accessTokenManagedSearch" -d '{"autoscaling": false, "name": "test-collection", "numShards": 1, "nearRealTimeReplicas": 1, "readOnlyReplicas": 0, "readWriteReplicas": 0}'

Delete a collection

Delete a collection from a Solr cluster in Lucidworks Managed Search.

Request

Send an HTTP request with these elements.

Element Description

Method

DELETE

Request URI

https://cloud.lucidworks.com/managed/api/customers/customerId/clusters/clusterId/collections/collectionName

Request header fields

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

Message body

None

Response

A response from a request to delete a Solr collection 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 taskId and the status of the request.

Example

Request:

curl -XDELETE -H "Authorization: Bearer accessTokenManagedSearch" "https://cloud.lucidworks.com/managed/api/customers/lucidworks/clusters/jeff-1/collections/test-collection"