Adobe ColdFusion 8

Collection maintenance options

The mkvdk utility provides a variety of collection maintenance options, as described in the following table:

Option

Description

-backup dir

Backs up the collection into the specified directory. The backup does not include the tde subdirectory. The tde subdirectory is created by and for Topic Document Entry if Topic Document Entry is used to create or maintain the collection.

-repair

Repairs the collection, performed by an API call.

-purge

Waits the amount of time specified by the -purgewait option and then deletes all documents in the collection, but not the collection itself. It leaves the collection directory structure intact.

To specify a different wait period, use the -purgewait option instead of the
-purge option. If you do not use the -purgewait option, the default is 600 seconds.

-purgeback

Used with the -purge option, performs a purge in the background.

-purgewait sec

Specifies to the -purge option how many seconds to wait. If you do not specify sec, the default is 600.

-noservice

Prevents collection servicing, which includes indexing, by this instance of the mkvdk command, performed by an API call.

-persist

Services the collection repeatedly, at default intervals of 30 seconds. Use the -sleeptime option to set a different interval.

-sleeptime sec

Specifies the interval between service calls when the mkvdk utility is run with the -persist option.

-optimize spec

Performs various optimizations on the collection, depending on the value of spec. The specifier, spec, is a string consisting of keywords separated by hyphens, such as maxmerge-squeeze-readonly. For valid keywords, see Optimization keywords.

-noexit

Windows only. Causes the I/O window to remain after the program is finished. By default, the window closes and the program exits, so that scripts calling the mkvdk utility do not hang.

Examples: maintaining collections

The following examples show the commands for maintaining a collection.

Repairing a collection

The following command automatically repairs a collection, or enables it after manual repairs:

mkvdk -repair -collection path

Backing up a collection

The following command backs up a collection to the specified directory:

mkvdk -backup path_1 -collection path_2

Deleting a collection

To delete a collection, use the appropriate command for your operating system. For example, to remove the collection directory structure and control files on a UNIX system, use the following command:

rm -r -collection_path

Purging a collection

The following command deletes all documents from a collection, but does not delete the collection itself:

mkvdk -purge -collection path

Purging a collection in the background

The following command purges the specified collection in the background:

mkvdk -purge -purgeback -collection path

Specifying persistent service

The following command runs the mkvdk command as a persistent process, so that servicing is performed repeatedly after num idle seconds:

mkvdk -persist -sleeptime num -collection path

Deleting a collection

The -purge option deletes all documents in a collection, but does not delete the collection itself. To delete a collection, use operating system commands, such as the rm command on UNIX, to remove the collection directory structure and control files.

Optimization keywords

The following table describes the optimization keywords for the -optimize option:

Keyword

Description

maxclean

Performs the most comprehensive housekeeping possible, and removes out-of-date collection files. Adobe recommends this optimization only when you are preparing an isolated collection for publication. When using this type, if the collection is being searched, files sometimes get deleted too early, which can affect search results.

maxmerge

Performs maximal merging on the partitions to create partitions that are as large as possible. This creates partitions that can have up to 64000 documents in them.

readonly

Marks the collection as read-only and unchanged after the function call is done. This is appropriate for CD-ROM collections.

spanword

Creates a spanning word list across all the collection's partitions. A collection consists of numerous smaller units, called partitions, each of which includes a word list. Optionally, a spanning word list can be built with an ngram index.

ngramindex

Builds an ngram index for the collection. An ngram index is designed to improve the search performance for queries with the <TYPO> and <WILDCARD> operators. An ngram index cannot be built without a spanning word list. You can build a spanning word list and ngram index in the same command, for example:

mkvdk -collection collname -optimize spanword -ngramindex

squeeze

Squeezes deleted documents from the collection. Squeezing deleted documents recovers space in a collection, and improves search performance. (For more information about squeeze, see About squeezing deleted documents.) Using this option invalidates the search results.

vdbopt

Configures the collection's Verity databases (VDBs). Each collection consists of smaller units called VDBs. This keyword has the effect of linearizing the data in a VDB, and making the collection metadata contained in the VDB more streamlined. It also lets the VDB grow to a much larger size.

tuneup

Performs the same as combining the maxmerge, vdbopt, and spanword keywords.

publish

Performs the same as all of the optimization types combined. Use this keyword to optimize the collection for the best possible retrieval performance, such as for publication to a network on a server or on a CD-ROM.

About squeezing deleted documents

When a document is deleted from a collection, its space is not recovered. It is merely marked as deleted and not available for subsequent searches. Squeezing actually removes deleted documents from the collection's internal documents table and word indexes, thus creating a smaller collection and reducing the collection's disk space. A smaller collection has a more efficient structure that makes searching slightly faster and uses slightly less memory.

You can safely squeeze deleted documents for a collection at anytime, because the mkvdk utility ensures that the collection is available for searching and servicing through its self-administration features. The application does not need to temporarily disable a collection to squeeze deleted documents, because when a squeeze request is made, the mkvdk utility assigns a new revision code to the collection. After a squeeze has occurred, the next time the application accesses the collection, the Verity engine notifies the application that dramatic changes have been made, and points the application to the new collection data.

Squeezing deleted documents out of a collection is a significant update to the collection. If users are reviewing search results at the time when squeezing occurs, the search results might be invalidated after the squeeze operation.

About optimized Verity databases

The Verity database (VDB) is the fundamental storage mechanism responsible for supporting dynamic access to documents in collections. A VDB consists of simple tables with rows and columns that relate to each other by row position. VDB tables are not relational, and their architecture supports quick and efficient searching over textual data. A VDB consists of segments that are packed into a single file. One of the advantages of having one packed VDB file is optimized search performance. The fewer files that need to be opened during search processing, the faster the search performance.

The VDB optimization option optimizes the packing of a collection's VDBs. When VDBs are built during normal indexing operations, the segments are not stored sequentially in the one-file VDB file system. As a result of VDB optimization, performance can be improved by reserializing the packed segments in the VDBs so that all segments are contiguous, and VDBs can grow in size. Optimized VDBs can grow up to 2 GB, as opposed to the maximum 64 MB for an unoptimized VDB.

Using this option might degrade your indexing performance when certain indexing modes are set for the collection.