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

indri::collection::CompressedCollection Class Reference

#include <CompressedCollection.hpp>

Inheritance diagram for indri::collection::CompressedCollection:

indri::collection::Collection List of all members.

Public Member Functions

 CompressedCollection ()
 ~CompressedCollection ()
void create (const std::string &fileName)
void create (const std::string &fileName, const std::vector< std::string > &indexedFields)
void create (const std::string &fileName, const std::vector< std::string > &forwardIndexedFields, const std::vector< std::string > &reverseIndexedFields, bool storeDocs=true)
void reopen (const std::string &fileName)
void open (const std::string &fileName)
void openRead (const std::string &fileName)
void close ()
bool exists (lemur::api::DOCID_T documentID)
indri::api::ParsedDocument * retrieve (lemur::api::DOCID_T documentID)
std::string retrieveMetadatum (lemur::api::DOCID_T documentID, const std::string &attributeName)
std::vector< indri::api::ParsedDocument * > retrieveByMetadatum (const std::string &attributeName, const std::string &value)
std::vector< lemur::api::DOCID_T > retrieveIDByMetadatum (const std::string &attributeName, const std::string &value)
void addDocument (lemur::api::DOCID_T documentID, indri::api::ParsedDocument *document)
void compact (indri::index::DeletedDocumentList &deletedList)
void append (indri::collection::CompressedCollection &other, indri::index::DeletedDocumentList &deletedList, lemur::api::DOCID_T documentOffset)
std::vector< std::string > forwardFields ()
std::vector< std::string > reverseFields ()

Private Member Functions

void _writePositions (indri::api::ParsedDocument *document, int &keyLength, int &valueLength)
void _writeMetadataItem (indri::api::ParsedDocument *document, int i, int &keyLength, int &valueLength)
void _writeText (indri::api::ParsedDocument *document, int &keyLength, int &valueLength)
void _writeContent (indri::api::ParsedDocument *document, int &keyLength, int &valueLength)
void _writeContentLength (indri::api::ParsedDocument *document, int &keyLength, int &valueLength)
void _readPositions (indri::api::ParsedDocument *document, const void *positionData, int positionDataLength)
void _removeForwardLookups (indri::index::DeletedDocumentList &deletedList, lemur::file::Keyfile &keyfile)
void _removeReverseLookups (indri::index::DeletedDocumentList &deletedList, lemur::file::Keyfile &keyfile)
void _copyForwardLookup (const std::string &name, lemur::file::Keyfile &other, indri::index::DeletedDocumentList &deletedList, lemur::api::DOCID_T documentOffset)
void _copyReverseLookup (const std::string &name, lemur::file::Keyfile &other, indri::index::DeletedDocumentList &deletedList, lemur::api::DOCID_T documentOffset)
void _copyStorageEntry (indri::file::SequentialReadBuffer *input, indri::file::SequentialWriteBuffer *output, int key, UINT64 position, UINT64 length, lemur::file::Keyfile &lookup)
void _copyStorageData (indri::file::SequentialReadBuffer *input, indri::file::SequentialWriteBuffer *output, indri::index::DeletedDocumentList &deletedList, lemur::api::DOCID_T documentOffset, lemur::file::Keyfile &sourceLookup, lemur::file::Keyfile &destLookup, UINT64 storageLength)
void _copyForwardLookup (const std::string &name, lemur::file::Keyfile &other, lemur::api::DOCID_T documentOffset)

Private Attributes

indri::thread::Mutex _lock
std::string _basePath
lemur::file::Keyfile _lookup
indri::file::File _storage
indri::file::SequentialWriteBuffer * _output
indri::utility::Buffer _positionsBuffer
z_stream_p _stream
indri::utility::HashTable<
const char *, lemur::file::Keyfile * > 
_reverseLookups
indri::utility::HashTable<
const char *, lemur::file::Keyfile * > 
_forwardLookups
String_set * _strings
bool _storeDocs

Constructor & Destructor Documentation

indri::collection::CompressedCollection::CompressedCollection (   ) 
 

indri::collection::CompressedCollection::~CompressedCollection (   ) 
 


Member Function Documentation

void indri::collection::CompressedCollection::_copyForwardLookup (  const std::string &  name,
lemur::file::Keyfile &  other,
lemur::api::DOCID_T  documentOffset
)  [private]
 

void indri::collection::CompressedCollection::_copyForwardLookup (  const std::string &  name,
lemur::file::Keyfile &  other,
indri::index::DeletedDocumentList &  deletedList,
lemur::api::DOCID_T  documentOffset
)  [private]
 

void indri::collection::CompressedCollection::_copyReverseLookup (  const std::string &  name,
lemur::file::Keyfile &  other,
indri::index::DeletedDocumentList &  deletedList,
lemur::api::DOCID_T  documentOffset
)  [private]
 

void indri::collection::CompressedCollection::_copyStorageData (  indri::file::SequentialReadBuffer *  input,
indri::file::SequentialWriteBuffer *  output,
indri::index::DeletedDocumentList &  deletedList,
lemur::api::DOCID_T  documentOffset,
lemur::file::Keyfile &  sourceLookup,
lemur::file::Keyfile &  destLookup,
UINT64  storageLength
)  [private]
 

void indri::collection::CompressedCollection::_copyStorageEntry (  indri::file::SequentialReadBuffer *  input,
indri::file::SequentialWriteBuffer *  output,
int  key,
UINT64  position,
UINT64  length,
lemur::file::Keyfile &  lookup
)  [private]
 

void indri::collection::CompressedCollection::_readPositions (  indri::api::ParsedDocument *  document,
const void *  positionData,
int  positionDataLength
)  [private]
 

void indri::collection::CompressedCollection::_removeForwardLookups (  indri::index::DeletedDocumentList &  deletedList,
lemur::file::Keyfile &  keyfile
)  [private]
 

void indri::collection::CompressedCollection::_removeReverseLookups (  indri::index::DeletedDocumentList &  deletedList,
lemur::file::Keyfile &  keyfile
)  [private]
 

void indri::collection::CompressedCollection::_writeContent (  indri::api::ParsedDocument *  document,
int &  keyLength,
int &  valueLength
)  [private]
 

void indri::collection::CompressedCollection::_writeContentLength (  indri::api::ParsedDocument *  document,
int &  keyLength,
int &  valueLength
)  [private]
 

void indri::collection::CompressedCollection::_writeMetadataItem (  indri::api::ParsedDocument *  document,
int  i,
int &  keyLength,
int &  valueLength
)  [private]
 

void indri::collection::CompressedCollection::_writePositions (  indri::api::ParsedDocument *  document,
int &  keyLength,
int &  valueLength
)  [private]
 

void indri::collection::CompressedCollection::_writeText (  indri::api::ParsedDocument *  document,
int &  keyLength,
int &  valueLength
)  [private]
 

void indri::collection::CompressedCollection::addDocument (  lemur::api::DOCID_T  documentID,
indri::api::ParsedDocument *  document
)  [virtual]
 

Implements indri::collection::Collection.

void indri::collection::CompressedCollection::append (  indri::collection::CompressedCollection &  other,
indri::index::DeletedDocumentList &  deletedList,
lemur::api::DOCID_T  documentOffset
) 
 

void indri::collection::CompressedCollection::close (   ) 
 

void indri::collection::CompressedCollection::compact (  indri::index::DeletedDocumentList &  deletedList  ) 
 

void indri::collection::CompressedCollection::create (  const std::string &  fileName,
const std::vector< std::string > &  forwardIndexedFields,
const std::vector< std::string > &  reverseIndexedFields,
bool  storeDocs = true
) 
 

void indri::collection::CompressedCollection::create (  const std::string &  fileName,
const std::vector< std::string > &  indexedFields
) 
 

void indri::collection::CompressedCollection::create (  const std::string &  fileName  ) 
 

bool indri::collection::CompressedCollection::exists (  lemur::api::DOCID_T  documentID  ) 
 

std::vector< std::string > indri::collection::CompressedCollection::forwardFields (   ) 
 

void indri::collection::CompressedCollection::open (  const std::string &  fileName  ) 
 

void indri::collection::CompressedCollection::openRead (  const std::string &  fileName  ) 
 

void indri::collection::CompressedCollection::reopen (  const std::string &  fileName  ) 
 

indri::api::ParsedDocument * indri::collection::CompressedCollection::retrieve (  lemur::api::DOCID_T  documentID  )  [virtual]
 

Implements indri::collection::Collection.

std::vector< indri::api::ParsedDocument * > indri::collection::CompressedCollection::retrieveByMetadatum (  const std::string &  attributeName,
const std::string &  value
) 
 

std::vector< lemur::api::DOCID_T > indri::collection::CompressedCollection::retrieveIDByMetadatum (  const std::string &  attributeName,
const std::string &  value
) 
 

std::string indri::collection::CompressedCollection::retrieveMetadatum (  lemur::api::DOCID_T  documentID,
const std::string &  attributeName
) 
 

std::vector< std::string > indri::collection::CompressedCollection::reverseFields (   ) 
 


Member Data Documentation

std::string indri::collection::CompressedCollection::_basePath [private]
 

indri::utility::HashTable<const char*, lemur::file::Keyfile*> indri::collection::CompressedCollection::_forwardLookups [private]
 

indri::thread::Mutex indri::collection::CompressedCollection::_lock [private]
 

lemur::file::Keyfile indri::collection::CompressedCollection::_lookup [private]
 

indri::file::SequentialWriteBuffer* indri::collection::CompressedCollection::_output [private]
 

indri::utility::Buffer indri::collection::CompressedCollection::_positionsBuffer [private]
 

indri::utility::HashTable<const char*, lemur::file::Keyfile*> indri::collection::CompressedCollection::_reverseLookups [private]
 

indri::file::File indri::collection::CompressedCollection::_storage [private]
 

bool indri::collection::CompressedCollection::_storeDocs [private]
 

z_stream_p indri::collection::CompressedCollection::_stream [private]
 

String_set* indri::collection::CompressedCollection::_strings [private]
 


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