|
Public Types |
typedef std::vector< indri::index::Index * > | index_vector |
typedef indri::atomic::ref_ptr<
index_vector > | index_state |
Public Member Functions |
| Repository () |
| ~Repository () |
int | addDocument (indri::api::ParsedDocument *document, bool inCollection=true) |
void | deleteDocument (int documentID) |
const std::vector< Field > & | fields () const |
| the indexed fields for this collection
|
std::vector< std::string > | tags () const |
| the tags for this collection
|
std::vector< std::string > | priors () const |
| the named priors list for this collection
|
std::string | processTerm (const std::string &term) |
CompressedCollection * | collection () |
| the compressed document collection
|
void | create (const std::string &path, indri::api::Parameters *options=0) |
void | open (const std::string &path, indri::api::Parameters *options=0) |
void | openRead (const std::string &path, indri::api::Parameters *options=0) |
void | close () |
| Close the repository.
|
void | compact () |
index_state | indexes () |
| Indexes in this repository.
|
indri::collection::PriorListIterator * | priorListIterator (const std::string &priorName) |
| Return a prior iterator.
|
void | countQuery () |
| Notify the repository that a query has happened.
|
void | write () |
| Write the most recent state out to disk.
|
void | merge () |
| Merge all internal indexes together.
|
indri::index::DeletedDocumentList & | deletedList () |
| List of deleted documents in this repository.
|
Load | queryLoad () |
| Returns the average number of documents added each minute in the last 1, 5 and 15 minutes.
|
Load | documentLoad () |
| Returns the average number of documents added each minute in the last 1, 5 and 15 minutes.
|
Static Public Member Functions |
bool | exists (const std::string &path) |
void | makeEmpty (const std::string &path) |
| Make an empty repository directory on disk.
|
void | merge (const std::string &outputIndex, const std::vector< std::string > &inputIndexes) |
| Merge two or more repositories together.
|
Private Types |
enum | { LOAD_MINUTES = 15,
LOAD_MINUTE_FRACTION = 12
} |
Private Member Functions |
void | _writeParameters (const std::string &path) |
void | _checkpoint () |
void | _incrementLoad () |
void | _countDocumentAdd () |
Load | _computeLoad (indri::atomic::value_type *loadArray) |
void | _openPriors (const std::string &path) |
void | _closePriors () |
void | _buildFields () |
void | _buildChain (indri::api::Parameters ¶meters, indri::api::Parameters *options) |
void | _copyParameters (indri::api::Parameters &options) |
void | _removeStates (std::vector< index_state > &toRemove) |
void | _remove (const std::string &path) |
void | _openIndexes (indri::api::Parameters ¶ms, const std::string &parentPath) |
std::vector< index_state > | _statesContaining (std::vector< indri::index::Index * > &indexes) |
bool | _stateContains (index_state &state, std::vector< indri::index::Index * > &indexes) |
void | _swapState (std::vector< indri::index::Index * > &oldIndexes, indri::index::Index *newIndex) |
void | _closeIndexes () |
void | _merge (index_state &state) |
indri::index::Index * | _mergeStage (index_state &state) |
UINT64 | _mergeMemory (const std::vector< indri::index::Index * > &indexes) |
unsigned int | _mergeFiles (const std::vector< indri::index::Index * > &indexes) |
void | _merge () |
| merge all known indexes together
|
void | _write () |
| write the active index to disk
|
void | _trim () |
| merge together some of the more recent indexes
|
void | _startThreads () |
void | _stopThreads () |
void | _setThrashing (bool flag) |
UINT64 | _timeSinceThrashing () |
void | _addMemoryIndex () |
Static Private Member Functions |
std::vector< std::string > | _fieldNames (indri::api::Parameters ¶meters) |
std::string | _stemmerName (indri::api::Parameters ¶meters) |
void | _mergeClosedIndexes (const std::string &outputPath, const std::vector< std::string > &repositories, const std::vector< indri::collection::Repository::Field > &indexFields, const std::vector< lemur::api::DOCID_T > &documentMaximums) |
void | _writeMergedManifest (const std::string &path, indri::api::Parameters &firstManifest) |
void | _mergeBitmaps (const std::string &outputPath, const std::vector< std::string > &repositories, const std::vector< lemur::api::DOCID_T > &documentCounts) |
void | _mergeCompressedCollections (const std::string &outputPath, const std::vector< std::string > &repositories, const std::vector< lemur::api::DOCID_T > &documentMaximums) |
void | _cleanAndCreateDirectory (const std::string &path) |
std::vector< indri::index::Index::FieldDescription > | _fieldsForIndex (const std::vector< Repository::Field > &_fields) |
Private Attributes |
RepositoryMaintenanceThread * | _maintenanceThread |
RepositoryLoadThread * | _loadThread |
indri::thread::Mutex | _stateLock |
std::vector< index_state > | _states |
| protects against state changes
|
index_state | _active |
int | _indexCount |
volatile bool | _maintenanceRunning |
volatile bool | _loadThreadRunning |
indri::thread::Mutex | _addLock |
CompressedCollection * | _collection |
| protects addDocument
|
indri::index::DeletedDocumentList | _deletedList |
indri::api::Parameters | _parameters |
std::vector< indri::parse::Transformation * > | _transformations |
std::vector< Field > | _fields |
std::vector< indri::index::Index::FieldDescription > | _indexFields |
std::map< std::string, indri::file::File * > | _priorFiles |
std::string | _path |
bool | _readOnly |
INT64 | _memory |
UINT64 | _lastThrashTime |
volatile bool | _thrashing |
indri::atomic::value_type | _queryLoad [LOAD_MINUTES *LOAD_MINUTE_FRACTION] |
indri::atomic::value_type | _documentLoad [LOAD_MINUTES *LOAD_MINUTE_FRACTION] |
Friends |
class | RepositoryMaintenanceThread |
class | RepositoryLoadThread |