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

ixCurrentKey

NAME

ixCurrentKey -- Get the current key from the index's wordlist.

SYNOPSIS

void ixCurrentKey(OnixIndexManagerT IndexManager, DictionaryCursorT *Cursor, UCharT *Word, ULongT *NumRecords, ULongT *NumWords, StatusCodeT *Status)

ARGUMENTS

IndexManager -- An index manager which has an open index associated with it.

Cursor  -- A pointer to a structure of type DictionaryCursorT.  This is used to keep track of where you are in the indexes dictionary.

Word   -- A pointer to a buffer where the word will be placed.  (This buffer should be 256 characters in size.)

NumRecords -- Pointer to an unsigned long integer.  This is where the number of records the word is in will be reported.

NumWords  -- Pointer to an unsigned long integer.  This is where the total number of times a word occurs throughout the index will be reported.  (A word, of course, can occur more than once in a record.)

Status  -- Pointer to a value of type StatusCodeT.  If an error occurs, Status will be set to to a value less than zero.    When the end of the word list is reached, a value corresponding to eEndOfWordList (also less than zero) will be placed in Status.

RETURNS

Nothing.

DESCRIPTION

ixCurrentKey reports which word in the indexes wordlist is the current word.  The current word is placed in the buffer Word, and  the number of records (and the total number of times the word occurs) are placed in NumRecords and NumWords respectively.

In order for a call to ixCurrentKey to succeed, a call must have been placed to ixFindKey() at some point using the dictionary cursor Cursor in order to have the cursor actually have data which corresponds to a point in the dictionary.

The word returned in the buffer Word, is filled in as a Pascal string.  This means that the first character has a value between 0 and 255 which gives the length of the string.  (This also implicitly implies that the buffer Word should be 256 characters in length or more.)

SEE ALSO

ixNextKey, ixPreviousKey, ixFindKey