Previous: WordCursor DESCRIPTION, Up: WordCursor [Contents][Index]
Clear all data in object, set GetResult() data to NULL but do not delete it (the application is responsible for that).
Returns the type of the object. May be overloaded by derived classes to differentiate them at runtime. Returns WORD_CURSOR.
Optimize the cursor before starting a Walk. Returns OK on success, NOTOK otherwise.
Save in buffer all the information necessary to resume the walk at the point it left. The ASCII representation of the last key found (GetFound()) is written in buffer using the WordKey::Get method.
Restore from buffer all the information necessary to
resume the walk at the point it left. The
buffer
is expected
to contain an ASCII representation of a WordKey (see WordKey::Set
method). A
Seek
is done on the key and the object is prepared
to jump to the next occurrence when
WalkNext
is called (the
cursor_get_flags is set to
DB_NEXT.
Walk and collect data from the index. Returns OK on success, NOTOK otherwise.
Must be called before other Walk methods are used. Fill internal state according to input parameters and move before the first matching entry. Returns OK on success, NOTOK otherwise.
Move before the first index matching entry. Returns OK on success, NOTOK otherwise.
Move to the next matching entry. At end of list, WORD_WALK_ATEND is returned. Returns OK on success, NOTOK otherwise. When OK is returned, the GetFound() method returns the matched entry. When WORD_WALK_ATEND is returned, the GetFound() method returns an empty object if the end of the index was reached or the match that was found and that is greated than the specified search criterion.
Advance the cursor one step. The entry pointed to by the cursor may or may not match the requirements. Returns OK if entry pointed by cursor matches requirements. Returns NOTOK on failure. Returns WORD_WALK_NOMATCH_FAILED if the current entry does not match requirements, it’s safe to call WalkNextStep again until either OK or NOTOK is returned.
Return 0 if this key must not be returned by WalkNext as a valid match. The WalkNextStep method calls this virtual method immediately after jumping to the next entry in the database. This may be used, for instance, to skip entries that were selected by a previous search.
Terminate Walk, free allocated resources. Returns OK on success, NOTOK otherwise.
Move before the inverted index position specified in
patch.
May only be called after a successfull call to the
WalkNext
or
WalkNextStep
method.
Copy defined fields from
patch
into a copy of the
found
data member and
initialize internal state so that
WalkNext
jumps to
this key next time it’s called (cursor_get_flag set to DB_SET_RANGE).
Returns OK if successfull, NOTOK otherwise.
Returns true if cursor is positioned after the last possible match, false otherwise.
Returns true if cursor hit a value that does not match search criterion.
Returns the search criterion.
Returns the type of action when a matching entry is found.
Returns the list of WordReference found. The application is responsible for deallocation of the list. If the action input flag bit HTDIG_WORDLIST_COLLECTOR is not set, return a NULL pointer.
For debugging purposes. Returns the list of WordReference hit during the search process. Some of them match the searched key, some don’t. The application is responsible for deallocation of the list.
For debugging purposes. Set the list of WordReference hit during the search process.
Returns the last entry hit by the search. Only contains
a valid value if the last
WalkNext
or
WalkNextStep
call was successfull (i.e. returned OK).
Returns the status of the cursor which may be OK or WORD_WALK_ATEND.
Convert the whole structure to an ASCII string description. Returns OK if successfull, NOTOK otherwise.
Convert the whole structure to an ASCII string description and return it.
Protected method. Derived classes should use this function to initialize the object if they do not call a WordCursor constructor in their own constructutor. Initialization may occur after the object is created and must occur before a Walk* method is called. See the DESCRIPTION section for the semantics of the arguments. Return OK on success, NOTOK on error.
Input data. The key to be searched, see DESCRIPTION for more information.
Output data. Last match found. Use GetFound() to retrieve it.
Output data. WORD_WALK_ATEND if cursor is past last match, OK otherwise. Use GetStatus() to retrieve it.
The inverted index used by this cursor.
Previous: WordCursor DESCRIPTION, Up: WordCursor [Contents][Index]