ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Public Attributes | List of all members
meta::index::score_data Struct Reference

A score_data object contains information needed to evaluate a ranking function. More...

#include <score_data.h>

Public Member Functions

 score_data (inverted_index &p_idx, double p_avg_dl, uint64_t p_num_docs, uint64_t p_total_terms, const corpus::document &p_query)
 Constructor to initialize most elements. More...
 

Public Attributes

inverted_indexidx
 index queries are running on
 
double avg_dl
 average document length
 
uint64_t num_docs
 total number of documents
 
uint64_t total_terms
 total number of terms in the index
 
const corpus::documentquery
 the current query
 
term_id t_id
 doc term id
 
uint64_t query_term_count
 query term count
 
uint64_t doc_count
 number of docs that t_id appears in
 
uint64_t corpus_term_count
 number of times t_id appears in corpus
 
doc_id d_id
 document id
 
uint64_t doc_term_count
 number of times the term appears in the current doc
 
uint64_t doc_size
 total number of terms in the doc
 
uint64_t doc_unique_terms
 number of unique terms in the doc
 

Detailed Description

A score_data object contains information needed to evaluate a ranking function.

Data is set by the base ranker class as needed, so the derived ranking classes don't make many unncessary calls to the inverted index.

Constructor & Destructor Documentation

meta::index::score_data::score_data ( inverted_index p_idx,
double  p_avg_dl,
uint64_t  p_num_docs,
uint64_t  p_total_terms,
const corpus::document p_query 
)
inline

Constructor to initialize most elements.

Parameters
p_idxThe index that is being used
p_avg_dlThe average doc length in the index
p_num_docsThe number of docs in the index
p_total_termsThe total number of terms in the index
p_queryThe current query

The documentation for this struct was generated from the following file: