Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::index::LemurIndriIndex Class Reference

#include <LemurIndriIndex.hpp>

Inheritance diagram for lemur::index::LemurIndriIndex:

lemur::api::Index List of all members.

Public Member Functions

 LemurIndriIndex ()
 Create.

virtual ~LemurIndriIndex ()
lemur::api::DocInfoListdocInfoList (lemur::api::TERMID_T termID) const
 doc entries in a term index with positions, DocList

lemur::api::TermInfoListtermInfoList (lemur::api::DOCID_T docID) const
 word entries in a document index (bag of words), TermList

lemur::api::TermInfoListtermInfoListSeq (lemur::api::DOCID_T docID) const
 word entries in a document index (sequence of words), TermList

const lemur::api::DocumentManagerdocManager (lemur::api::DOCID_T docID) const
const string & getRepositoryName () const
const int field (std::string fieldName) const
 Convert a field name to a field ID (for those index types that support fields).

const int field (const char *fieldName) const
 Convert a field name to a field ID (for those index types that support fields).

const std::string field (int fieldID) const
 Convert a field ID to a field name (for those index types that support fields).

virtual lemur::api::FieldInfoListfieldInfoList (lemur::api::DOCID_T docID) const
virtual lemur::api::FieldInfoListfieldInfoList (lemur::api::DOCID_T docID, int fieldID) const
virtual std::vector< std::string > documentMetadata (const std::vector< lemur::api::DOCID_T > &documentIDs, const std::string &attributeName)
 Fetch the named metadata attribute for a list of document ids.

virtual std::vector< std::string > documentMetadata (lemur::api::DOCID_T documentID, const std::string &attributeName)
 Fetch the named metadata attribute for a single document id.

Open index
bool open (const std::string &indexName)
 Open previously created Repository with given prefix.

bool open (const char *indexName)
 Open previously created Repository with given prefix.

void close ()
 close the Repository

Spelling and index conversion
lemur::api::TERMID_T term (const lemur::api::TERM_T &word) const
 Convert a term spelling to a termID.

const lemur::api::TERM_T term (lemur::api::TERMID_T termID) const
 Convert a termID to its spelling.

lemur::api::DOCID_T document (const lemur::api::EXDOCID_T &docIDStr) const
 Convert a spelling to docID.

const lemur::api::EXDOCID_T document (lemur::api::DOCID_T docID) const
 Convert a docID to its spelling.

Summary counts
lemur::api::COUNT_T docCount () const
 Total count (i.e., number) of documents in collection.

lemur::api::COUNT_T termCountUnique () const
 Total count of unique terms in collection.

lemur::api::COUNT_T termCount (lemur::api::TERMID_T termID) const
 Total counts of a term in collection.

lemur::api::COUNT_T termCount () const
 Total counts of all terms in collection.

float docLengthAvg () const
 Average document length.

lemur::api::COUNT_T docCount (lemur::api::TERMID_T termID) const
 Total counts of doc with a given term.

lemur::api::COUNT_T docLength (lemur::api::DOCID_T documentID) const
 return length of the document


Private Member Functions

indri::index::Index_indexWithDocument (indri::collection::Repository::index_state &indexes, lemur::api::DOCID_T documentID) const

Private Attributes

indri::collection::Repository_repository
string _repositoryName
lemur::api::DocumentManager_docMgr

Detailed Description

Lemur Index API wrapper for Indri Repository.


Constructor & Destructor Documentation

lemur::index::LemurIndriIndex::LemurIndriIndex  ) 
 

Create.

lemur::index::LemurIndriIndex::~LemurIndriIndex  )  [virtual]
 


Member Function Documentation

indri::index::Index * lemur::index::LemurIndriIndex::_indexWithDocument indri::collection::Repository::index_state indexes,
lemur::api::DOCID_T  documentID
const [private]
 

void lemur::index::LemurIndriIndex::close  ) 
 

close the Repository

lemur::api::COUNT_T lemur::index::LemurIndriIndex::docCount lemur::api::TERMID_T  termID  )  const [virtual]
 

Total counts of doc with a given term.

Implements lemur::api::Index.

lemur::api::COUNT_T lemur::index::LemurIndriIndex::docCount  )  const [virtual]
 

Total count (i.e., number) of documents in collection.

Implements lemur::api::Index.

lemur::api::DocInfoList * lemur::index::LemurIndriIndex::docInfoList lemur::api::TERMID_T  termID  )  const [virtual]
 

doc entries in a term index with positions, DocList

Implements lemur::api::Index.

lemur::api::COUNT_T lemur::index::LemurIndriIndex::docLength lemur::api::DOCID_T  documentID  )  const [virtual]
 

return length of the document

Implements lemur::api::Index.

float lemur::index::LemurIndriIndex::docLengthAvg  )  const [virtual]
 

Average document length.

Implements lemur::api::Index.

const lemur::api::DocumentManager* lemur::index::LemurIndriIndex::docManager lemur::api::DOCID_T  docID  )  const [inline, virtual]
 

A String identifier for the document manager to get at the source of the document with this document id

Reimplemented from lemur::api::Index.

const lemur::api::EXDOCID_T lemur::index::LemurIndriIndex::document lemur::api::DOCID_T  docID  )  const [virtual]
 

Convert a docID to its spelling.

Implements lemur::api::Index.

lemur::api::DOCID_T lemur::index::LemurIndriIndex::document const lemur::api::EXDOCID_T docIDStr  )  const
 

Convert a spelling to docID.

std::vector< std::string > lemur::index::LemurIndriIndex::documentMetadata lemur::api::DOCID_T  documentID,
const std::string &  attributeName
[virtual]
 

Fetch the named metadata attribute for a single document id.

Reimplemented from lemur::api::Index.

std::vector< std::string > lemur::index::LemurIndriIndex::documentMetadata const std::vector< lemur::api::DOCID_T > &  documentIDs,
const std::string &  attributeName
[virtual]
 

Fetch the named metadata attribute for a list of document ids.

Reimplemented from lemur::api::Index.

const std::string lemur::index::LemurIndriIndex::field int  fieldID  )  const [virtual]
 

Convert a field ID to a field name (for those index types that support fields).

Reimplemented from lemur::api::Index.

const int lemur::index::LemurIndriIndex::field const char *  fieldName  )  const [virtual]
 

Convert a field name to a field ID (for those index types that support fields).

Reimplemented from lemur::api::Index.

const int lemur::index::LemurIndriIndex::field std::string  fieldName  )  const [virtual]
 

Convert a field name to a field ID (for those index types that support fields).

Reimplemented from lemur::api::Index.

lemur::api::FieldInfoList * lemur::index::LemurIndriIndex::fieldInfoList lemur::api::DOCID_T  docID,
int  fieldID
const [virtual]
 

returns a new instance of FieldInfoList which represents field entities in a document index for a specific field, you must delete the instance later.

See also:
FieldInfoList Note that not all index types support fields - those that do should override this method.

Reimplemented from lemur::api::Index.

lemur::api::FieldInfoList * lemur::index::LemurIndriIndex::fieldInfoList lemur::api::DOCID_T  docID  )  const [virtual]
 

returns a new instance of FieldInfoList which represents all field entities in a document index, you must delete the instance later.

See also:
FieldInfoList Note that not all index types support fields - those that do should override this method.

Reimplemented from lemur::api::Index.

const string& lemur::index::LemurIndriIndex::getRepositoryName  )  const [inline]
 

bool lemur::index::LemurIndriIndex::open const char *  indexName  )  [inline]
 

Open previously created Repository with given prefix.

bool lemur::index::LemurIndriIndex::open const std::string &  indexName  ) 
 

Open previously created Repository with given prefix.

const lemur::api::TERM_T lemur::index::LemurIndriIndex::term lemur::api::TERMID_T  termID  )  const [virtual]
 

Convert a termID to its spelling.

Implements lemur::api::Index.

lemur::api::TERMID_T lemur::index::LemurIndriIndex::term const lemur::api::TERM_T word  )  const
 

Convert a term spelling to a termID.

lemur::api::COUNT_T lemur::index::LemurIndriIndex::termCount  )  const [virtual]
 

Total counts of all terms in collection.

Implements lemur::api::Index.

lemur::api::COUNT_T lemur::index::LemurIndriIndex::termCount lemur::api::TERMID_T  termID  )  const [virtual]
 

Total counts of a term in collection.

Implements lemur::api::Index.

lemur::api::COUNT_T lemur::index::LemurIndriIndex::termCountUnique  )  const [virtual]
 

Total count of unique terms in collection.

Implements lemur::api::Index.

lemur::api::TermInfoList * lemur::index::LemurIndriIndex::termInfoList lemur::api::DOCID_T  docID  )  const [virtual]
 

word entries in a document index (bag of words), TermList

Implements lemur::api::Index.

lemur::api::TermInfoList * lemur::index::LemurIndriIndex::termInfoListSeq lemur::api::DOCID_T  docID  )  const [virtual]
 

word entries in a document index (sequence of words), TermList

Reimplemented from lemur::api::Index.


Member Data Documentation

lemur::api::DocumentManager* lemur::index::LemurIndriIndex::_docMgr [private]
 

indri::collection::Repository* lemur::index::LemurIndriIndex::_repository [private]
 

string lemur::index::LemurIndriIndex::_repositoryName [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:06 2010 for Lemur by doxygen 1.3.4