Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (20 sloc) 1.17 KB

Operations: Server: How to Compact a Database

To compact database, please use CompactDatabaseOperation. You can choose what should be compacted: documents and/or listed indexes.

Syntax

{CODE compact_1@ClientApi\Operations\Server\Compact.cs /}

{CODE compact_2@ClientApi\Operations\Server\Compact.cs /}

Parameters
DatabaseName string Name of a database to compact
Documents bool Indicates if documents should be compacted
Indexes string[] List of index names to compact

Example I

{CODE compact_3@ClientApi\Operations\Server\Compact.cs /}

Example II

{CODE compact_4@ClientApi\Operations\Server\Compact.cs /}

Remarks

The compacting operation is executed asynchronously and during this operation the database will be offline.

Related Articles

You can’t perform that action at this time.