ixPreviousKey -- Gets the previous key in the index's wordlist.
void ixPreviousKey(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.
Nothing.
ixPreviousKey advances the dictionary cursor one word back through the dictionary. The previous word is also 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 ixPreviousKey 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. Calls may be made to ixPreviousKey until the Status variable is set to the error code eEndOfWordList.
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.)