Holds generic data structures and functions that inverted_index and forward_index both use.
More...
#include <disk_index.h>
Holds generic data structures and functions that inverted_index and forward_index both use.
Provides common interface for both and is implemented using the pointer-to-implementation method.
meta::index::disk_index::disk_index |
( |
const cpptoml::table & |
config, |
|
|
const std::string & |
name |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
config | The config settings used to create this index |
name | The name of this disk_index |
std::string meta::index::disk_index::index_name |
( |
| ) |
const |
- Returns
- the name of this index
uint64_t meta::index::disk_index::num_docs |
( |
| ) |
const |
- Returns
- the number of documents in this index
std::string meta::index::disk_index::doc_name |
( |
doc_id |
d_id | ) |
const |
- Parameters
-
- Returns
- the actual name of this document
std::string meta::index::disk_index::doc_path |
( |
doc_id |
d_id | ) |
const |
- Parameters
-
- Returns
- the path to the file containing this document
std::vector< doc_id > meta::index::disk_index::docs |
( |
| ) |
const |
- Returns
- a vector of doc_ids that are contained in this index
uint64_t meta::index::disk_index::doc_size |
( |
doc_id |
d_id | ) |
const |
- Parameters
-
d_id | The document to search for |
- Returns
- the size of the given document (the total number of terms occurring)
class_label meta::index::disk_index::label |
( |
doc_id |
d_id | ) |
const |
- Parameters
-
d_id | The doc id to find the class label for |
- Returns
- the label of the class that the document belongs to, or an empty string if a label was not assigned
label_id meta::index::disk_index::lbl_id |
( |
doc_id |
d_id | ) |
const |
- Parameters
-
d_id | THe doc id to find the label_id for |
- Returns
- the label_id of the class that to document belongs to
label_id meta::index::disk_index::id |
( |
class_label |
label | ) |
const |
- Parameters
-
- Returns
- the label_id for the given class label
class_label meta::index::disk_index::class_label_from_id |
( |
label_id |
l_id | ) |
const |
- Parameters
-
l_id | The id of the class label in question |
- Returns
- the integer label id of a document
uint64_t meta::index::disk_index::num_labels |
( |
| ) |
const |
- Returns
- the number of labels in this index
std::vector< class_label > meta::index::disk_index::class_labels |
( |
| ) |
const |
- Returns
- the distinct class labels possible for documents in this index
uint64_t meta::index::disk_index::unique_terms |
( |
doc_id |
d_id | ) |
const |
|
virtual |
- Parameters
-
- Returns
- the number of unique terms in d_id
uint64_t meta::index::disk_index::unique_terms |
( |
| ) |
const |
|
virtual |
term_id meta::index::disk_index::get_term_id |
( |
const std::string & |
term | ) |
|
- Parameters
-
- Returns
- the term_id associated with the parameter
std::string meta::index::disk_index::term_text |
( |
term_id |
t_id | ) |
const |
- Parameters
-
t_id | The term_id to get the original text for |
- Returns
- the string representation of the term
The documentation for this class was generated from the following files: