#include <BasicIndex.hpp>
Inheritance diagram for BasicIndex:

Public Methods | |
| BasicIndex () | |
| constructor (used when opening an index). | |
| BasicIndex (Compress *pc) | |
| constructor (used when building an index). | |
| virtual | ~BasicIndex () |
| virtual bool | open (const char *indexName) |
| Open previously created Index, return true if opened successfully. | |
| void | build (DocStream *collectionStream,const char *file,const char *outputPrefix,int totalDocs=0x1000000,int maxMemory=0x4000000,int minimumCount=1,int maxVocSize=2000000) |
Spelling and index conversion | |
| virtual int | term (const char *word) |
| Convert a term spelling to a termID. | |
| virtual const char* | term (int termID) |
| Convert a termID to its spelling. | |
| virtual int | document (const char *docIDStr) |
| Convert a spelling to docID. | |
| virtual const char* | document (int docID) |
| Convert a docID to its spelling. | |
| virtual const char* | termLexiconID () |
| return the term lexicon ID. | |
Summary counts | |
| virtual int | docCount () |
| Total count (i.e., number) of documents in collection. | |
| virtual int | termCountUnique () |
| Total count of unique terms in collection. | |
| virtual int | termCount (int termID)const |
| Total counts of a term in collection. | |
| virtual int | termCount ()const |
| Total counts of all terms in collection. | |
| virtual float | docLengthAvg () |
| Average document length. | |
| virtual int | docCount (int termID) |
| Total counts of doc with a given term. | |
| virtual int | docLength (int docID)const |
| Total counts of terms in a document. | |
Index entry access | |
| virtual DocInfoList* | docInfoList (int termID) |
doc entries in a term index, caller should release the memory
| |
| virtual TermInfoList* | termInfoList (int docID) |
word entries in a document index, caller should release the memory
| |
BasicIndex is a basic implementation of Index. It creates and manages two indices (term->doc and doc->term) as well as a term lexicon and document id lexicon. The application can pass in any compressor when calling the build function. @See Index for an example of use.
|
|
constructor (used when opening an index).
|
|
|
constructor (used when building an index).
|
|
|
|
|
|
|
|
|
Total counts of doc with a given term.
Reimplemented from Index. |
|
|
Total count (i.e., number) of documents in collection.
Reimplemented from Index. |
|
|
doc entries in a term index, caller should release the memory
Reimplemented from Index. |
|
|
Total counts of terms in a document.
Reimplemented from Index. |
|
|
Average document length.
Reimplemented from Index. |
|
|
Convert a docID to its spelling.
Reimplemented from Index. |
|
|
Convert a spelling to docID.
Reimplemented from Index. |
|
|
Open previously created Index, return true if opened successfully.
Reimplemented from Index. |
|
|
Convert a termID to its spelling.
Reimplemented from Index. |
|
|
Convert a term spelling to a termID.
Reimplemented from Index. |
|
|
Total counts of all terms in collection.
Reimplemented from Index. |
|
|
Total counts of a term in collection.
Reimplemented from Index. |
|
|
Total count of unique terms in collection.
Reimplemented from Index. |
|
|
word entries in a document index, caller should release the memory
Reimplemented from Index. |
|
|
return the term lexicon ID.
Reimplemented from Index. |
1.2.4 written by Dimitri van Heesch,
© 1997-2000