Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

QueryEnvironment Class Reference

#include <QueryEnvironment.hpp>

List of all members.

Public Methods

 QueryEnvironment ()
 ~QueryEnvironment ()
void setMemory (UINT64 memory)
 Set the amount of memory to use.

void setScoringRules (const std::vector< std::string > &rules)
 Set the scoring rules.

void setStopwords (const std::vector< std::string > &stopwords)
 Set the stopword list for query processing.

void addServer (const std::string &hostname)
 Add a remote server.

void addIndex (const std::string &pathname)
 Add a local repository.

void close ()
 Close the QueryEnvironment.

std::vector< ScoredExtentResultrunQuery (const std::string &query, int resultsRequested)
 Run an Indri query language query.
See also:
ScoredExtentResult.


std::vector< ScoredExtentResultrunQuery (const std::string &query, const std::vector< DOCID_T > &documentSet, int resultsRequested)
QueryAnnotationrunAnnotatedQuery (const std::string &query, int resultsRequested)
 Run an Indri query language query.
See also:
QueryAnnotation.


QueryAnnotationrunAnnotatedQuery (const std::string &query, const std::vector< DOCID_T > &documentSet, int resultsRequested)
std::vector< ParsedDocument * > documents (const std::vector< DOCID_T > &documentIDs)
 Fetch the parsed documents for a given list of document ids. Caller is responsible for deleting the returned elements.

std::vector< ParsedDocument * > documents (const std::vector< ScoredExtentResult > &results)
 Fetch the parsed documents for a given list of ScoredExtentResults Caller is responsible for deleting the returned elements.

std::vector< std::string > documentMetadata (const std::vector< DOCID_T > &documentIDs, const std::string &attributeName)
 Fetch the named metadata attribute for a list of document ids.

std::vector< std::string > documentMetadata (const std::vector< ScoredExtentResult > &documentIDs, const std::string &attributeName)
 Fetch the named metadata attribute for a list of ScoredExtentResults.

INT64 termCount ()
 Return total number of terms.

INT64 termCount (const std::string &term)
 Return total number of term occurrences.

INT64 stemCount (const std::string &term)
 Return total number of stem occurrences.

INT64 termFieldCount (const std::string &term, const std::string &field)
 Return total number of term occurrences within a field.

INT64 stemFieldCount (const std::string &term, const std::string &field)
 Return total number of stem occurrences within a field.

std::vector< std::string > fieldList ()
 Return the list of fields.

INT64 documentCount ()
 Return total number of documents in the collection.

INT64 documentCount (const std::string &term)
std::vector< DocumentVector * > documentVectors (const std::vector< DOCID_T > &documentIDs)
 Fetch a document vector for a list of documents. Caller responsible for deleting the Vector.


Detailed Description

Principal class for interacting with Indri indexes during retrieval. Provides the API for opening one or more Repository servers, either local or remote. Provides the API for querying the servers with the Indri query language, and additionally requesting aggregate collection statistics.

QueryEnviroment parameters.


Constructor & Destructor Documentation

QueryEnvironment::QueryEnvironment  
 

QueryEnvironment::~QueryEnvironment  
 


Member Function Documentation

void QueryEnvironment::addIndex const std::string &    pathname
 

Add a local repository.

Parameters:
pathname  the path to the repository.

void QueryEnvironment::addServer const std::string &    hostname
 

Add a remote server.

Parameters:
hostname  the host the server is running on

void QueryEnvironment::close  
 

Close the QueryEnvironment.

INT64 QueryEnvironment::documentCount const std::string &    term
 

INT64 QueryEnvironment::documentCount  
 

Return total number of documents in the collection.

Returns:
total number of documents in the aggregated collection

std::vector< std::string > QueryEnvironment::documentMetadata const std::vector< ScoredExtentResult > &    documentIDs,
const std::string &    attributeName
 

Fetch the named metadata attribute for a list of ScoredExtentResults.

Parameters:
documentIDs  the list of ScoredExtentResults
attributeName  the name of the metadata attribute
Returns:
the vector of string values for that attribute

std::vector< std::string > QueryEnvironment::documentMetadata const std::vector< DOCID_T > &    documentIDs,
const std::string &    attributeName
 

Fetch the named metadata attribute for a list of document ids.

Parameters:
documentIDs  the list of ids
attributeName  the name of the metadata attribute
Returns:
the vector of string values for that attribute

std::vector< ParsedDocument * > QueryEnvironment::documents const std::vector< ScoredExtentResult > &    results
 

Fetch the parsed documents for a given list of ScoredExtentResults Caller is responsible for deleting the returned elements.

Parameters:
results  the list of ScoredExtentResults
Returns:
the vector of ParsedDocument pointers.

std::vector< ParsedDocument * > QueryEnvironment::documents const std::vector< DOCID_T > &    documentIDs
 

Fetch the parsed documents for a given list of document ids. Caller is responsible for deleting the returned elements.

Parameters:
documentIDs  the list of ids
Returns:
the vector of ParsedDocument pointers.

std::vector< DocumentVector * > QueryEnvironment::documentVectors const std::vector< DOCID_T > &    documentIDs
 

Fetch a document vector for a list of documents. Caller responsible for deleting the Vector.

Parameters:
documentIDs  the vector of document ids.
Returns:
DocumentVector pointer for the specified document.

std::vector< std::string > QueryEnvironment::fieldList  
 

Return the list of fields.

Returns:
vector of field names.

QueryAnnotation * QueryEnvironment::runAnnotatedQuery const std::string &    query,
const std::vector< DOCID_T > &    documentSet,
int    resultsRequested
 

QueryAnnotation * QueryEnvironment::runAnnotatedQuery const std::string &    query,
int    resultsRequested
 

Run an Indri query language query.

See also:
QueryAnnotation.

Parameters:
query  the query to run
resultsRequested  maximum number of results to return
Returns:
pointer to QueryAnnotations for the query

std::vector< ScoredExtentResult > QueryEnvironment::runQuery const std::string &    query,
const std::vector< DOCID_T > &    documentSet,
int    resultsRequested
 

std::vector< ScoredExtentResult > QueryEnvironment::runQuery const std::string &    query,
int    resultsRequested
 

Run an Indri query language query.

See also:
ScoredExtentResult.

Parameters:
query  the query to run
resultsRequested  maximum number of results to return
Returns:
the vector of ScoredExtentResults for the query

void QueryEnvironment::setMemory UINT64    memory
 

Set the amount of memory to use.

Parameters:
memory  number of bytes to allocate

void QueryEnvironment::setScoringRules const std::vector< std::string > &    rules
 

Set the scoring rules.

Parameters:
rules  the vector of scoring rules.

void QueryEnvironment::setStopwords const std::vector< std::string > &    stopwords
 

Set the stopword list for query processing.

Parameters:
stopwords  the list of stopwords

INT64 QueryEnvironment::stemCount const std::string &    term
 

Return total number of stem occurrences.

Parameters:
term  the stem to count
Returns:
total frequency of this stem in the aggregated collection

INT64 QueryEnvironment::stemFieldCount const std::string &    term,
const std::string &    field
 

Return total number of stem occurrences within a field.

Parameters:
term  the stem to count
field  the name of the field
Returns:
total frequency of this stem within this field in the aggregated collection

INT64 QueryEnvironment::termCount const std::string &    term
 

Return total number of term occurrences.

Parameters:
term  the term to count
Returns:
total frequency of this term in the aggregated collection

INT64 QueryEnvironment::termCount  
 

Return total number of terms.

Returns:
total number of terms in the aggregated collection

INT64 QueryEnvironment::termFieldCount const std::string &    term,
const std::string &    field
 

Return total number of term occurrences within a field.

Parameters:
term  the term to count
field  the name of the field
Returns:
total frequency of this term within this field in the aggregated collection


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 12:59:52 2004 for Lemur Toolkit by doxygen1.2.18