Previous: WordList CONFIGURATION, Up: WordList [Contents][Index]
Return a pointer to the WordContext object used to create this instance.
Return a pointer to the WordContext object used to create this instance as a const.
Insert
wordRef
in index. If the
Key()
part of
the
wordRef
exists in the index, override it.
Returns OK on success, NOTOK on error.
Returns OK if wordRef exists in the index, NOTOK otherwise.
Returns OK if word exists in the index, NOTOK otherwise.
Delete all entries in the index whose key matches the
Key()
part of
wordRef
, using the
Walk
method.
Returns the number of entries successfully deleted.
Delete the entry in the index that exactly matches the
Key()
part of
wordRef.
Returns OK if deletion is successfull, NOTOK otherwise.
Open inverted index
filename.
mode
may be
O_RDONLY
or
O_RDWR.
If mode is
O_RDWR
it can be or’ed with
O_TRUNC
to reset
the content of an existing inverted index.
Return OK on success, NOTOK otherwise.
Close inverted index. Return OK on success, NOTOK otherwise.
Return the size of the index in pages.
Return the page size
Return a pointer to the inverted index dictionnary.
Return the filename given to the last call to Open.
Return the mode given to the last call to Open.
Returns the list of word occurrences exactly matching the
Key()
part of
wordRef.
The
List
returned
contains pointers to
WordReference
objects. It is
the responsibility of the caller to free the list. See List.h
header for usage.
Returns the list of word occurrences exactly matching the
word.
The
List
returned
contains pointers to
WordReference
objects. It is
the responsibility of the caller to free the list. See List.h
header for usage.
Alias to the Find method.
Alias to the FindWord method.
Returns the list of word occurrences matching the
Key()
part of
wordRef.
In the
Key()
, the string
(accessed with
GetWord()
) matches any string that begins
with it. The
List
returned contains pointers to
WordReference
objects. It is the responsibility of the
caller to free the list.
Returns the list of word occurrences matching the
word.
In the
Key()
, the string (accessed with
GetWord()
) matches any string that begins with it. The
List
returned contains pointers to
WordReference
objects. It is the responsibility of the caller to free the
list.
Returns a list of all unique words contained in the inverted
index. The
List
returned contains pointers to
String
objects. It is the responsibility of the caller
to free the list. See List.h header for usage.
Returns a list of all entries contained in the
inverted index. The
List
returned contains pointers to
WordReference
objects. It is the responsibility of
the caller to free the list. See List.h header for usage.
Create a cursor that searches all the occurrences in the inverted index and call ncallback with ncallback_data for every match.
Create a cursor that searches all the occurrences in the inverted index and that match nsearchKey. If naction is set to HTDIG_WORDLIST_WALKER calls searchKey.callback with searchKey.callback_data for every match. If naction is set to HTDIG_WORDLIST_COLLECT push each match in searchKey.collectRes data member as a WordReference object. It is the responsibility of the caller to free the searchKey.collectRes list.
Create a cursor that searches all the occurrences in the inverted index and that match nsearchKey and calls ncallback with ncallback_data for every match.
Create a WordKey object and return it. The bufferin argument is used to initialize the key, as in the WordKey::Set method. The first component of bufferin must be a word that is translated to the corresponding numerical id using the WordDict::Serial method.
Create a WordReference object and return it. The bufferin argument is used to initialize the structure, as in the WordReference::Set method. The first component of bufferin must be a word that is translated to the corresponding numerical id using the WordDict::Serial method. If the exists argument is set to 1, the method WordDict::SerialExists is used instead, that is no serial is assigned to the word if it does not already have one. Before translation the word is normalized using the WordType::Normalize method. The word is saved using the WordReference::SetWord method.
Alias for Word(bufferin, 1).
Accelerate bulk insertions in the inverted index. All insertion done with the Override method are batched instead of being updating the inverted index immediately. No update of the inverted index file is done before the BatchEnd method is called.
Terminate a bulk insertion started with a call to the BatchStart method. When all insertions are done the AllRef method is called to restore statistics.
Return in
noccurrence
the number of occurrences of the
string contained in the
GetWord()
part of
key.
Returns OK on success, NOTOK otherwise.
Write on file descriptor
f
an ASCII description of the
index. Each line of the file contains a
WordReference
ASCII description.
Return OK on success, NOTOK otherwise.
Write on file descriptor f the complete dictionnary with statistics. Return OK on success, NOTOK otherwise.
Read
WordReference
ASCII descriptions from
f
,
returns the number of inserted WordReference or < 0 if an error
occurs. Invalid descriptions are ignored as well as empty
lines.
Previous: WordList CONFIGURATION, Up: WordList [Contents][Index]