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

indri::index::MemoryIndex Class Reference

#include <MemoryIndex.hpp>

Inheritance diagram for indri::index::MemoryIndex:

indri::index::Index List of all members.

Public Member Functions

 MemoryIndex ()
 MemoryIndex (lemur::api::DOCID_T docBase)
 MemoryIndex (lemur::api::DOCID_T docBase, const std::vector< Index::FieldDescription > &fields)
 ~MemoryIndex ()
void close ()
lemur::api::DOCID_T documentBase ()
lemur::api::DOCID_T documentMaximum ()
 The documentMaximum is at least one greater than the largest documentID used in this index.

lemur::api::TERMID_T term (const std::string &t)
lemur::api::TERMID_T term (const char *t)
std::string term (lemur::api::TERMID_T termID)
int field (const char *fieldName)
int field (const std::string &fieldName)
std::string field (int fieldID)
int documentLength (lemur::api::DOCID_T documentID)
UINT64 documentCount ()
UINT64 documentCount (const std::string &term)
UINT64 uniqueTermCount ()
UINT64 termCount (const std::string &term)
UINT64 termCount ()
UINT64 fieldTermCount (const std::string &field)
UINT64 fieldTermCount (const std::string &field, const std::string &term)
UINT64 fieldDocumentCount (const std::string &field)
UINT64 fieldDocumentCount (const std::string &field, const std::string &term)
DocListIteratordocListIterator (lemur::api::TERMID_T termID)
DocListIteratordocListIterator (const std::string &term)
DocListFileIteratordocListFileIterator ()
DocExtentListIteratorfieldListIterator (int fieldID)
DocExtentListIteratorfieldListIterator (const std::string &field)
const TermListtermList (lemur::api::DOCID_T documentID)
TermListFileIteratortermListFileIterator ()
VocabularyIteratorvocabularyIterator ()
VocabularyIteratorfrequentVocabularyIterator ()
VocabularyIteratorinfrequentVocabularyIterator ()
DocumentDataIteratordocumentDataIterator ()
indri::thread::LockableiteratorLock ()
indri::thread::LockablestatisticsLock ()
lemur::api::DOCID_T addDocument (indri::api::ParsedDocument &document)
size_t memorySize ()

Private Member Functions

void _addOpenTags (indri::utility::greedy_vector< indri::parse::TagExtent * > &indexedTags, indri::utility::greedy_vector< indri::parse::TagExtent * > &openTags, indri::utility::greedy_vector< indri::parse::TagExtent * > &extents, unsigned int &extentIndex, unsigned int position)
void _removeClosedTags (indri::utility::greedy_vector< indri::parse::TagExtent * > &tags, unsigned int position)
void _writeFieldExtents (lemur::api::DOCID_T documentID, indri::utility::greedy_vector< indri::parse::TagExtent * > &indexedTags)
void _writeDocumentTermList (UINT64 &offset, int &byteLength, lemur::api::DOCID_T documentID, int documentLength, indri::index::TermList &locatedTerms)
void _writeDocumentStatistics (UINT64 offset, int byteLength, int indexedLength, int totalLength, int uniqueTerms)
term_entry_lookupTerm (const char *term)
void _destroyTerms ()
int _fieldID (const std::string &fieldName)
int _fieldID (const char *fieldName)

Private Attributes

indri::utility::RegionAllocator _allocator
indri::thread::ReadersWritersLock _lock
indri::thread::ReaderLockable _readLock
indri::thread::WriterLockable _writeLock
CorpusStatistics _corpusStatistics
lemur::api::DOCID_T _baseDocumentID
indri::index::TermList _termList
indri::utility::greedy_vector<
term_entry * > 
_seenTerms
indri::utility::HashTable<
const char *, term_entry * > 
_stringToTerm
std::vector< term_entry * > _idToTerm
indri::utility::HashTable<
const char *, int > 
_fieldLookup
std::vector< FieldStatistics_fieldData
std::vector< indri::index::DocExtentListMemoryBuilder * > _fieldLists
std::vector< indri::index::DocumentData_documentData
std::list< indri::utility::Buffer * > _termLists
UINT64 _termListsBaseOffset

Constructor & Destructor Documentation

indri::index::MemoryIndex::MemoryIndex  ) 
 

indri::index::MemoryIndex::MemoryIndex lemur::api::DOCID_T  docBase  ) 
 

indri::index::MemoryIndex::MemoryIndex lemur::api::DOCID_T  docBase,
const std::vector< Index::FieldDescription > &  fields
 

indri::index::MemoryIndex::~MemoryIndex  ) 
 


Member Function Documentation

void indri::index::MemoryIndex::_addOpenTags indri::utility::greedy_vector< indri::parse::TagExtent * > &  indexedTags,
indri::utility::greedy_vector< indri::parse::TagExtent * > &  openTags,
indri::utility::greedy_vector< indri::parse::TagExtent * > &  extents,
unsigned int &  extentIndex,
unsigned int  position
[private]
 

void indri::index::MemoryIndex::_destroyTerms  )  [private]
 

int indri::index::MemoryIndex::_fieldID const char *  fieldName  )  [private]
 

int indri::index::MemoryIndex::_fieldID const std::string &  fieldName  )  [private]
 

indri::index::MemoryIndex::term_entry * indri::index::MemoryIndex::_lookupTerm const char *  term  )  [private]
 

void indri::index::MemoryIndex::_removeClosedTags indri::utility::greedy_vector< indri::parse::TagExtent * > &  tags,
unsigned int  position
[private]
 

void indri::index::MemoryIndex::_writeDocumentStatistics UINT64  offset,
int  byteLength,
int  indexedLength,
int  totalLength,
int  uniqueTerms
[private]
 

void indri::index::MemoryIndex::_writeDocumentTermList UINT64 offset,
int &  byteLength,
lemur::api::DOCID_T  documentID,
int  documentLength,
indri::index::TermList locatedTerms
[private]
 

void indri::index::MemoryIndex::_writeFieldExtents lemur::api::DOCID_T  documentID,
indri::utility::greedy_vector< indri::parse::TagExtent * > &  indexedTags
[private]
 

lemur::api::DOCID_T indri::index::MemoryIndex::addDocument indri::api::ParsedDocument document  ) 
 

void indri::index::MemoryIndex::close  )  [virtual]
 

Implements indri::index::Index.

indri::index::DocListFileIterator * indri::index::MemoryIndex::docListFileIterator  )  [virtual]
 

Implements indri::index::Index.

indri::index::DocListIterator * indri::index::MemoryIndex::docListIterator const std::string &  term  )  [virtual]
 

Implements indri::index::Index.

indri::index::DocListIterator * indri::index::MemoryIndex::docListIterator lemur::api::TERMID_T  termID  )  [virtual]
 

Implements indri::index::Index.

lemur::api::DOCID_T indri::index::MemoryIndex::documentBase  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::documentCount const std::string &  term  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::documentCount  )  [virtual]
 

Implements indri::index::Index.

indri::index::DocumentDataIterator * indri::index::MemoryIndex::documentDataIterator  )  [virtual]
 

Implements indri::index::Index.

int indri::index::MemoryIndex::documentLength lemur::api::DOCID_T  documentID  )  [virtual]
 

Implements indri::index::Index.

lemur::api::DOCID_T indri::index::MemoryIndex::documentMaximum  )  [virtual]
 

The documentMaximum is at least one greater than the largest documentID used in this index.

Implements indri::index::Index.

std::string indri::index::MemoryIndex::field int  fieldID  )  [virtual]
 

Implements indri::index::Index.

int indri::index::MemoryIndex::field const std::string &  fieldName  )  [virtual]
 

Implements indri::index::Index.

int indri::index::MemoryIndex::field const char *  fieldName  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::fieldDocumentCount const std::string &  field,
const std::string &  term
[virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::fieldDocumentCount const std::string &  field  )  [virtual]
 

Implements indri::index::Index.

indri::index::DocExtentListIterator * indri::index::MemoryIndex::fieldListIterator const std::string &  field  )  [virtual]
 

Implements indri::index::Index.

indri::index::DocExtentListIterator * indri::index::MemoryIndex::fieldListIterator int  fieldID  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::fieldTermCount const std::string &  field,
const std::string &  term
[virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::fieldTermCount const std::string &  field  )  [virtual]
 

Implements indri::index::Index.

indri::index::VocabularyIterator * indri::index::MemoryIndex::frequentVocabularyIterator  )  [virtual]
 

Implements indri::index::Index.

indri::index::VocabularyIterator * indri::index::MemoryIndex::infrequentVocabularyIterator  )  [virtual]
 

Implements indri::index::Index.

indri::thread::Lockable * indri::index::MemoryIndex::iteratorLock  )  [virtual]
 

Implements indri::index::Index.

size_t indri::index::MemoryIndex::memorySize  ) 
 

indri::thread::Lockable * indri::index::MemoryIndex::statisticsLock  )  [virtual]
 

Implements indri::index::Index.

std::string indri::index::MemoryIndex::term lemur::api::TERMID_T  termID  )  [virtual]
 

Implements indri::index::Index.

lemur::api::TERMID_T indri::index::MemoryIndex::term const char *  t  )  [virtual]
 

Implements indri::index::Index.

lemur::api::TERMID_T indri::index::MemoryIndex::term const std::string &  t  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::termCount  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::termCount const std::string &  term  )  [virtual]
 

Implements indri::index::Index.

const indri::index::TermList * indri::index::MemoryIndex::termList lemur::api::DOCID_T  documentID  )  [virtual]
 

Implements indri::index::Index.

indri::index::TermListFileIterator * indri::index::MemoryIndex::termListFileIterator  )  [virtual]
 

Implements indri::index::Index.

UINT64 indri::index::MemoryIndex::uniqueTermCount  )  [virtual]
 

Implements indri::index::Index.

indri::index::VocabularyIterator * indri::index::MemoryIndex::vocabularyIterator  )  [virtual]
 

Implements indri::index::Index.


Member Data Documentation

indri::utility::RegionAllocator indri::index::MemoryIndex::_allocator [private]
 

lemur::api::DOCID_T indri::index::MemoryIndex::_baseDocumentID [private]
 

CorpusStatistics indri::index::MemoryIndex::_corpusStatistics [private]
 

std::vector<indri::index::DocumentData> indri::index::MemoryIndex::_documentData [private]
 

std::vector<FieldStatistics> indri::index::MemoryIndex::_fieldData [private]
 

std::vector<indri::index::DocExtentListMemoryBuilder*> indri::index::MemoryIndex::_fieldLists [private]
 

indri::utility::HashTable<const char*, int> indri::index::MemoryIndex::_fieldLookup [private]
 

std::vector<term_entry*> indri::index::MemoryIndex::_idToTerm [private]
 

indri::thread::ReadersWritersLock indri::index::MemoryIndex::_lock [private]
 

indri::thread::ReaderLockable indri::index::MemoryIndex::_readLock [private]
 

indri::utility::greedy_vector<term_entry*> indri::index::MemoryIndex::_seenTerms [private]
 

indri::utility::HashTable<const char*, term_entry*> indri::index::MemoryIndex::_stringToTerm [private]
 

indri::index::TermList indri::index::MemoryIndex::_termList [private]
 

std::list<indri::utility::Buffer*> indri::index::MemoryIndex::_termLists [private]
 

UINT64 indri::index::MemoryIndex::_termListsBaseOffset [private]
 

indri::thread::WriterLockable indri::index::MemoryIndex::_writeLock [private]
 


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