Skip to main content
PUT
/
collections
/
{collection}
Create or update a collection
import requests

url = "https://{FUSION HOST}/api/collections/{collection}"

payload = {
    "createdAt": "2023-11-07T05:31:56Z",
    "searchClusterId": "<string>",
    "autoCommit": 15,
    "autoSoftCommit": "false",
    "commitWithin": 10000,
    "features": {},
    "compositeIdSpec": {
        "routeKey1Field": "<string>",
        "routeKey1Bits": 123,
        "routeKey2Field": "<string>",
        "routeKey2Bits": 123
    },
    "solrParams": {
        "name": "<string>",
        "numShards": 123,
        "replicationFactor": 123,
        "collection.configName": "<string>"
    },
    "modifiedAt": "2023-11-07T05:31:56Z",
    "type": "DATA",
    "relatedCollectionId": "<string>",
    "metadata": {}
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "searchClusterId": "<string>",
  "autoCommit": 15,
  "autoSoftCommit": "false",
  "commitWithin": 10000,
  "features": {},
  "compositeIdSpec": {
    "routeKey1Field": "<string>",
    "routeKey1Bits": 123,
    "routeKey2Field": "<string>",
    "routeKey2Bits": 123
  },
  "solrParams": {
    "name": "<string>",
    "numShards": 123,
    "replicationFactor": 123,
    "collection.configName": "<string>"
  },
  "modifiedAt": "2023-11-07T05:31:56Z",
  "type": "DATA",
  "relatedCollectionId": "<string>",
  "metadata": {}
}

Headers

If-Match
string
default:"-1"

An optional tag to match against the specified blob.

Path Parameters

collection
string
required

The name of a collection.

Body

application/json

JSON-formatted configuration values.

createdAt
string<date-time>
searchClusterId
string
autoCommit
integer<int32>
default:15

Solr hard commit inherited from the collection's solrconfig.xml that is designated as Fusion's default parameter for Solr data commits. Number of seconds in which the data is saved, but this parameter does not force the search results to refresh immediately. With this setting, search performance is not slowed, but the new data may not show in search results until the next refresh. Default value is 15.

autoSoftCommit
boolean
default:false

Solr soft commit that does not save the data, but makes the data visible to searches almost immediately. If the system crashes, that new data is lost because it has not been saved. Default is false, and search visibility is managed using the commitWithin setting.

commitWithin
integer<int32>
default:10000

Solr's commitWithin parameter, configured at the collection level with a default of 10000 milliseconds, ensures data is committed and available for searching within 10 seconds. The default for signals collections is 1000 milliseconds. Fusion uses commitWithin to avoid relying on specific Solr-side configurations. The com.lucidworks.apollo.solr.commitWithin global property defines the default commitWithin for all documents added through Fusion. When you create a new collection in Fusion, its per-collection commitWithin is initialized from this global default.

features
object
compositeIdSpec
object
solrParams
object
modifiedAt
string<date-time>
type
enum<string>
Available options:
DATA,
LOGS,
METRICS,
SIGNALS,
SIGNALS_AGGREGATION,
SEARCHLOGS,
SYNONYMS,
RECOMMENDATIONS,
HISTORY,
BLOBS,
MESSAGES,
TAXONOMY,
CRAWL_DB,
JOB_HISTORY,
ARCHIVING,
AUTOCOMPLETE_DOCUMENTS,
QUERY_REWRITE,
USER_PREFS,
JOB_REPORTS,
ACL,
NULL
metadata
object

Response

200 - application/json

successful operation

id
string
createdAt
string<date-time>
searchClusterId
string
autoCommit
integer<int32>
default:15

Solr hard commit inherited from the collection's solrconfig.xml that is designated as Fusion's default parameter for Solr data commits. Number of seconds in which the data is saved, but this parameter does not force the search results to refresh immediately. With this setting, search performance is not slowed, but the new data may not show in search results until the next refresh. Default value is 15.

autoSoftCommit
boolean
default:false

Solr soft commit that does not save the data, but makes the data visible to searches almost immediately. If the system crashes, that new data is lost because it has not been saved. Default is false, and search visibility is managed using the commitWithin setting.

commitWithin
integer<int32>
default:10000

Solr's commitWithin parameter, configured at the collection level with a default of 10000 milliseconds, ensures data is committed and available for searching within 10 seconds. The default for signals collections is 1000 milliseconds. Fusion uses commitWithin to avoid relying on specific Solr-side configurations. The com.lucidworks.apollo.solr.commitWithin global property defines the default commitWithin for all documents added through Fusion. When you create a new collection in Fusion, its per-collection commitWithin is initialized from this global default.

features
object
compositeIdSpec
object
solrParams
object
modifiedAt
string<date-time>
type
enum<string>
Available options:
DATA,
LOGS,
METRICS,
SIGNALS,
SIGNALS_AGGREGATION,
SEARCHLOGS,
SYNONYMS,
RECOMMENDATIONS,
HISTORY,
BLOBS,
MESSAGES,
TAXONOMY,
CRAWL_DB,
JOB_HISTORY,
ARCHIVING,
AUTOCOMPLETE_DOCUMENTS,
QUERY_REWRITE,
USER_PREFS,
JOB_REPORTS,
ACL,
NULL
metadata
object