Administration

Compact Collection

Compacts the data of a collection in order to reclaim disk space. The operation compacts the document and index data by rewriting the data while keeping the relevant entries. Under normal circumstances running a compact operation is not necessary, as the collection data eventually gets compacted anyway. However, in some situations, e.g. after running many update or remove operations, the data for a collection may contain a lot of outdated data for which the space shall be reclaimed. In this case, the compaction operation can be used.

put/_fabric/{fabric}/_api/collection/{collection-name}/compact

Request

Path parameters

fabricstring string required

The name of the fabric.

collection-namestring string required

The name of the collection.

Response

Successfully compacted the collection.

codeinteger

HTTP response code.

errorboolean

Flag if there is an error in response. False for this response.

idstring

Id of the the collection.

namestring

Name of the collection.

status0 | 2 | 3 | 4 | 5 | 6

Status of the collection.

  • 0: corrupted
  • 2: unloaded
  • 3: loaded
  • 4: unloading
  • 5: deleted
  • 6: loading
type2 | 3

Type of the collection.

  • 0: invalid collection
  • 2: document collection
  • 3: edge collection
collectionModel'DOC' | 'KV' | 'DYNAMO'

Type of collection model.

  • DOC: document model
  • KV: key/value model
  • DYNAMO: dynamo model
isSpotboolean

True if collection is a spot collection.

isLocalboolean

True if collection is a local collection.

hasStreamboolean

True if collection has a stream.

waitForSyncboolean

True if all data must be synced to storage before operation returns.

isSystemboolean

True if collection is a system collection.

globallyUniqueIdstring

Collection's global unique Id.

searchEnabledboolean

True if collection is searchable.

Example response

{
  "code": 200,
  "id": "89218",
  "name": "colltest0127133421258ogefv",
  "hasStream": true,
  "globallyUniqueId": "h2C627F3DCC8E/89218"
}

Changes

No recorded changes to this operation across all 1 revision of this API.