The Main Manual Page Dynamic API Documentation CD-ROM API Documentation About Onix Types About Onix Errors Onix's Web Site at Lextek International Lextek International Onix Full Text Indexing and Retrieval Toolkit

ixWritePartitionLocation

NAME

ixWritePartitionLocation -- Changes location for a specified partition in the index.

SYNOPSIS

void ixWritePartitionLocation(size_t PartitionNumber, char *FileName, StatusCodeT *Status)

ARGUMENTS

PartitionNumber -- A pointer to an unsigned integer. The value pointed to by PartitionNumber is set to the number of the partition which matches OldPosition.

FileName   -- A pointer to a zero terminated string which specifies the new position of the partition.

Status   --  A pointer to a StatusCode of type StatusCodeT.

RETURNS

 Nothing

DESCRIPTION

Sometimes with a distributed index, it makes sense to change the location of an partition. This can happen for example when new data is replacing old data in the index, a portion of the index is being moved to a different disk, or simply for efficiency reasons.

ixWritePartitionLocation tells the index where a given partition is located (given a partition number). It is important that the partition number specified is equal to or less than the number of partitions within the index. (The number of partitions in the index may be obtained by calling ixGetNumberOfUnoptimizedInsertions() and adding one.) PartitionNumbers are zero based. (i.e., the first partition number is 0.) If a partition already exists at the location specified by ParitionNumber, its location will be overwritten. ixWritePartitionLocation() leaves the original partitions data file untouched as does ixChangePartitionLocation().

Note: If index is currently being used by any other processes or threads, the various IndexManagers must reload the index for the changes to take effect.

SEE ALSO

 ixChangePartitionLocation, ixLoadPartition, ixSaveIndexingDataToPartition