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

lemurproject::indri::QueryEnvironment Class Reference

List of all members.

Public Member Functions

synchronized void delete ()
 QueryEnvironment ()
void addServer (String hostname) throws java.lang.Exception
void addIndex (String pathname) throws java.lang.Exception
void removeServer (String hostname) throws java.lang.Exception
void removeIndex (String pathname) throws java.lang.Exception
void close () throws java.lang.Exception
void setMemory (long memory) throws java.lang.Exception
void setScoringRules (String[] rules) throws java.lang.Exception
void setStopwords (String[] stopwords) throws java.lang.Exception
ScoredExtentResult[] runQuery (String query, int resultsRequested) throws java.lang.Exception
ScoredExtentResult[] runQuery (String query, int[] documentSet, int resultsRequested) throws java.lang.Exception
QueryResults runQuery (QueryRequest request) throws java.lang.Exception
QueryAnnotation runAnnotatedQuery (String query, int resultsRequested) throws java.lang.Exception
QueryAnnotation runAnnotatedQuery (String query, int[] documentSet, int resultsRequested) throws java.lang.Exception
ParsedDocument[] documents (int[] documentIDs) throws java.lang.Exception
ParsedDocument[] documents (ScoredExtentResult[] results) throws java.lang.Exception
String[] documentMetadata (int[] documentIDs, String attributeName) throws java.lang.Exception
String[] documentMetadata (ScoredExtentResult[] documentIDs, String attributeName) throws java.lang.Exception
int[] documentIDsFromMetadata (String attributeName, String[] attributeValue) throws java.lang.Exception
ParsedDocument[] documentsFromMetadata (String attributeName, String[] attributeValue) throws java.lang.Exception
long termCount () throws java.lang.Exception
long termCount (String term) throws java.lang.Exception
long termFieldCount (String term, String field) throws java.lang.Exception
String[] fieldList () throws java.lang.Exception
long documentCount () throws java.lang.Exception
long documentCount (String term) throws java.lang.Exception
DocumentVector[] documentVectors (int[] documentIDs) throws java.lang.Exception
double expressionCount (String expression, String queryType) throws java.lang.Exception
double expressionCount (String expression) throws java.lang.Exception
ScoredExtentResult[] expressionList (String expression, String queryType) throws java.lang.Exception
ScoredExtentResult[] expressionList (String expression) throws java.lang.Exception
int documentLength (int documentID) throws java.lang.Exception

Protected Member Functions

 QueryEnvironment (long cPtr, boolean cMemoryOwn)
void finalize ()

Static Protected Member Functions

long getCPtr (QueryEnvironment obj)

Protected Attributes

boolean swigCMemOwn

Private Attributes

long swigCPtr

Constructor & Destructor Documentation

lemurproject::indri::QueryEnvironment::QueryEnvironment long  cPtr,
boolean  cMemoryOwn
[inline, protected]
 

lemurproject::indri::QueryEnvironment::QueryEnvironment  )  [inline]
 


Member Function Documentation

void lemurproject::indri::QueryEnvironment::addIndex String  pathname  )  throws java.lang.Exception [inline]
 

Add a local repository

Parameters:
pathname the path to the repository.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::addServer String  hostname  )  throws java.lang.Exception [inline]
 

Add a remote server

Parameters:
hostname the host the server is running on
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::close  )  throws java.lang.Exception [inline]
 

Close the QueryEnvironment.

Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

synchronized void lemurproject::indri::QueryEnvironment::delete  )  [inline]
 

long lemurproject::indri::QueryEnvironment::documentCount String  term  )  throws java.lang.Exception [inline]
 

Return total number of documents in the collection for the given term.

Parameters:
term the term to count documents for
Returns:
total number of documents containing the term in the aggregated collection
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

long lemurproject::indri::QueryEnvironment::documentCount  )  throws java.lang.Exception [inline]
 

Return total number of documents in the collection.

Returns:
total number of documents in the aggregated collection
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

int [] lemurproject::indri::QueryEnvironment::documentIDsFromMetadata String  attributeName,
String[]  attributeValue
throws java.lang.Exception [inline]
 

Return a list of document IDs where the document has a metadata key that matches attributeName, with a value matching one of the attributeValues.

Parameters:
attributeName the name of the metadata attribute (e.g. 'url' or 'docno')
attributeValue values that the metadata attribute should match
Returns:
a vector of ParsedDocuments that match the given metadata criteria
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

int lemurproject::indri::QueryEnvironment::documentLength int  documentID  )  throws java.lang.Exception [inline]
 

Return all the length of a document.

Parameters:
documentID The internal document id.
Returns:
the length of the document.

String [] lemurproject::indri::QueryEnvironment::documentMetadata ScoredExtentResult[]  documentIDs,
String  attributeName
throws java.lang.Exception [inline]
 

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
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

String [] lemurproject::indri::QueryEnvironment::documentMetadata int[]  documentIDs,
String  attributeName
throws java.lang.Exception [inline]
 

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
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ParsedDocument [] lemurproject::indri::QueryEnvironment::documents ScoredExtentResult[]  results  )  throws java.lang.Exception [inline]
 

Fetch the parsed documents for a given list of ScoredExtentResults

Parameters:
results the list of ScoredExtentResults
Returns:
the vector of ParsedDocument pointers.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ParsedDocument [] lemurproject::indri::QueryEnvironment::documents int[]  documentIDs  )  throws java.lang.Exception [inline]
 

Fetch the parsed documents for a given list of ScoredExtentResults

Parameters:
documentIDs the list of ScoredExtentResults
Returns:
the vector of ParsedDocument pointers.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ParsedDocument [] lemurproject::indri::QueryEnvironment::documentsFromMetadata String  attributeName,
String[]  attributeValue
throws java.lang.Exception [inline]
 

Fetch all documents with a metadata key that matches attributeName, with a value matching one of the attributeValues.

Parameters:
attributeName the name of the metadata attribute (e.g. 'url' or 'docno')
attributeValues values that the metadata attribute should match
Returns:
a vector of ParsedDocuments that match the given metadata criteria
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

DocumentVector [] lemurproject::indri::QueryEnvironment::documentVectors int[]  documentIDs  )  throws java.lang.Exception [inline]
 

Fetch a document vector for a list of documents.

Parameters:
documentIDs the vector of document ids.
Returns:
DocumentVector pointer for the specified document.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

double lemurproject::indri::QueryEnvironment::expressionCount String  expression  )  throws java.lang.Exception [inline]
 

Return the total number of times this expression appears in the collection.

Parameters:
expression The expression to evaluate, probably an ordered or unordered window expression
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

double lemurproject::indri::QueryEnvironment::expressionCount String  expression,
String  queryType
throws java.lang.Exception [inline]
 

Return the total number of times this expression appears in the collection.

Parameters:
expression The expression to evaluate, probably an ordered or unordered window expression
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ScoredExtentResult [] lemurproject::indri::QueryEnvironment::expressionList String  expression  )  throws java.lang.Exception [inline]
 

Return all the occurrences of this expression in the collection. Note that the returned vector may be quite large for large collections, and therefore has the very real possibility of exhausting the memory of the machine. Use this method with discretion.

Parameters:
expression The expression to evaluate, probably an ordered or unordered window expression
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ScoredExtentResult [] lemurproject::indri::QueryEnvironment::expressionList String  expression,
String  queryType
throws java.lang.Exception [inline]
 

Return all the occurrences of this expression in the collection. Note that the returned vector may be quite large for large collections, and therefore has the very real possibility of exhausting the memory of the machine. Use this method with discretion.

Parameters:
expression The expression to evaluate, probably an ordered or unordered window expression
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

String [] lemurproject::indri::QueryEnvironment::fieldList  )  throws java.lang.Exception [inline]
 

Return the list of fields.

Returns:
vector of field names.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::finalize  )  [inline, protected]
 

long lemurproject::indri::QueryEnvironment::getCPtr QueryEnvironment  obj  )  [inline, static, protected]
 

void lemurproject::indri::QueryEnvironment::removeIndex String  pathname  )  throws java.lang.Exception [inline]
 

Remove a local repository

Parameters:
pathname the path to the repository.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::removeServer String  hostname  )  throws java.lang.Exception [inline]
 

Remove a remote server

Parameters:
hostname the host the server is running on
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

QueryAnnotation lemurproject::indri::QueryEnvironment::runAnnotatedQuery String  query,
int[]  documentSet,
int  resultsRequested
throws java.lang.Exception [inline]
 

Run an Indri query language query on a set of documents.

Parameters:
query the query to run
documentSet list of document ids to score.
resultsRequested maximum number of results to return
Returns:
pointer to QueryAnnotations for the query
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

QueryAnnotation lemurproject::indri::QueryEnvironment::runAnnotatedQuery String  query,
int  resultsRequested
throws java.lang.Exception [inline]
 

Run an Indri query language query.

Parameters:
query the query to run
resultsRequested maximum number of results to return
Returns:
pointer to QueryAnnotations for the query
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

QueryResults lemurproject::indri::QueryEnvironment::runQuery QueryRequest  request  )  throws java.lang.Exception [inline]
 

Run an Indri query request

Parameters:
request the query request to run
Returns:
the QueryResults
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ScoredExtentResult [] lemurproject::indri::QueryEnvironment::runQuery String  query,
int[]  documentSet,
int  resultsRequested
throws java.lang.Exception [inline]
 

Run an Indri query language query on a set of documents.

Parameters:
query the query to run
resultsRequested maximum number of results to return
documentSet the list of document ids to score.
Returns:
the vector of ScoredExtentResults for the query
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

ScoredExtentResult [] lemurproject::indri::QueryEnvironment::runQuery String  query,
int  resultsRequested
throws java.lang.Exception [inline]
 

Run an Indri query language query.

Parameters:
query the query to run
resultsRequested maximum number of results to return
Returns:
the vector of ScoredExtentResults for the query
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::setMemory long  memory  )  throws java.lang.Exception [inline]
 

Set the amount of memory to use.

Parameters:
memory number of bytes to allocate
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::setScoringRules String[]  rules  )  throws java.lang.Exception [inline]
 

Set the scoring rules

Parameters:
rules the vector of scoring rules.
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

void lemurproject::indri::QueryEnvironment::setStopwords String[]  stopwords  )  throws java.lang.Exception [inline]
 

Set the stopword list for query processing

Parameters:
stopwords the list of stopwords
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

long lemurproject::indri::QueryEnvironment::termCount String  term  )  throws java.lang.Exception [inline]
 

Return total number of term occurrences.

Parameters:
term the term to count
Returns:
total frequency of this term in the aggregated collection
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

long lemurproject::indri::QueryEnvironment::termCount  )  throws java.lang.Exception [inline]
 

Return total number of terms.

Returns:
total number of terms in the aggregated collection
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.

long lemurproject::indri::QueryEnvironment::termFieldCount String  term,
String  field
throws java.lang.Exception [inline]
 

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
Exceptions:
Exception if a lemur::api::Exception was thrown by the JNI library.


Member Data Documentation

boolean lemurproject::indri::QueryEnvironment::swigCMemOwn [protected]
 

long lemurproject::indri::QueryEnvironment::swigCPtr [private]
 


The documentation for this class was generated from the following file:
Generated on Tue Jun 15 11:03:07 2010 for Lemur by doxygen 1.3.4