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

ixMakeIndexActive

NAME

 ixMakeIndexActive -- Integrate new index data into the index.

SYNOPSIS

 void ixMakeIndexActive(OnixIndexManagerT IndexManager, OnixIndexingEngineT Indexer, StatusCodeT *Status);

ARGUMENTS

IndexManager   -- An index manager created by a call to ixCreateIndex, with an open index and indexing session currently active.

Indexer  -- The indexing engine which was created by a call to ixStartIndexingSession

Status -- A pointer to a value of type StatusCodeT.  If an error occurs, it will be reported in Status.  Otherwise, Status will be set to a value of 0 or greater.

RETURNS

 Nothing

DESCRIPTION

ixMakeIndexActive takes the indexing data which has been processed after first calling ixStartIndexingSession, then indexing a series of data, and finishing by a call to ixFinalProcessIndex() and makes it part of the index as a whole. ixMakeIndexActive() modifies the index structure so there should not be any accesses to the index during the time that this function executes. All index managers across all processes and threads which access the index need to reload the index either by calling ixCloseIndex then ixOpenIndex or by calling ixReloadIndex(). The idea behind ixMakeIndexActive is to isolate all the modifications to the main index structure to a single call which can be executed quickly. Otherwise, ixEndIndexingSession does the same thing as ixFinalProcessIndex followed by a call to ixMakeIndexActive. ixFinalProcessIndex processes all the temporary index data separately from the main index so that the index may be accessed without corruption while it is running. ixFinalProcessIndex must be called before ixMakeIndexActive for the call to be successful. ixMakeIndexActive typically runs extremely quickly. For a distributed index times range from 10-20ms (more or less depending on the system). For a non-distributed index, times are more as the new index data needs to be copied into the main index file. The time that this takes will depend heavily on the amount of data indexed, the speed of your hard drive(s), and the OS.

 

SEE ALSO

 ixFinalProcessIndex, ixEndIndexingSession