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

ixVectorPreviousHit

NAME

 ixVectorPreviousHit -- Get the previous hit in the query vector.

SYNOPSIS

void ixVectorPreviousHit(OnixQueryVectorT  Vector, RecordNumT *RecordNum, RecordNumT *WordNum, RecordNumT *Count, FloatT *Float, StatusCodeT *Status)

ARGUMENTS

Vector -- A vector which has been returned from a such as ixProcessQuery.

RecordNum -- A pointer to a value of type RecordNumT. This is where the record number of the current hit is returned.

WordNum -- A pointer to a value of type WordNumT.  This is where the word number of the current hit is returned.

Count -- A pointer to a value of type RecordNumT.  This is reserved for future use.

Weight -- A pointer to a floating point value of type FloatT. This is the final weight of the record which was used when ranking. If you did not do a ranked search, the value put into Weight can simply be ignored.

Status -- A pointer to a value of type StatusCodeT.  This is where error codes and status codes are returned.  When you are at the beginning of the query vector, Status will be set to EndOfHitList.

RETURNS

Nothing.

If an error occurs, Status will be set to an error value ( n < 0). If you are at the end of the vector, Status will be set to EndOfHitList.

DESCRIPTION

ixVectorPreviousHit is used to find out what the previous hit is in the query vector.  It returns both the record number and the word number of the current hit.  If you are using a record level index, you will not need to pay attention to the word number. In order for ixVectorPreviousHit to work, the current hit in the query vector must not be the first one.  Or, in other words, you will have needed to have advanced through the query vector using ixVectorNextHit.  (You can't advance before the beginning of the list.)  The two functions ixVectorPreviousHit and ixVectorNextHit allow you to move either direction in the query vector.

SEE ALSO

ixVectorNextHit, ixVectorCurrentHit, ixNumHits, ixVectorRewind