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

ixIncrementRecord

NAME

 ixIncrementRecord --  Tells the indexing engine that a new record will be started.

SYNOPSIS

 void ixIncrementRecord(OnixIndexingEngineT IndexingEngine,  WordTypeT *Word, StatusCodeT *Status)

ARGUMENTS

 IndexingEngine -- An indexing engine object.  (Created by a call to ixStartIndexingSession()).

 *Word  -- A pointer to the structure of type WordTypeT which has been used for indexing so far.

 *Status  -- A pointer to a value of type StatusCodeT.

RETURNS

 Nothing
 Status will be set to an error value if an error condition occurs

DESCRIPTION

 Information retrieval engines see text as a sequence of "records" or "chunks."  When a query is performed, the results list lists which records match the query.  It is usually best to make a record a logical unit of text such as a book, document, section, or paragraph.  Onix allows you to define what a record is by calling ixIncrementRecord() when you complete indexing all the words in the current record and intend on starting a new record.

 IMPORTANT NOTE: ixIncrementRecord should be called between records.  This function signals to the indexing engine the end of one record and the beginning of the next.  ixIncrementRecord should not be called immediately prior to a call to ixEndIndexingSession.  If ixIncrementRecord is called immediately prior to ixEndIndexingSession, the following scenario occurs:  The indexing engine reserves a new record number for the expected upcoming record.  When ixEndIndexingSession is called immediately afterwards, this can leave an unused record number which can cause the index to become out of sync later if any of the dynamic capabilities of the index are taken advantage of.  Pseudo code for the solution to this is as follows:

ixStartIndexingSession()
for(EACH RECORD) {

   for(EACH WORD) {
       ixIndexWord(Word)
   }
   if(MORE DATA TO INDEX) {
      ixIncrementRecord(Word)
   }
}
ixEndIndexingSession()


 

SEE ALSO

 ixIndexWord, ixIndexWordEx