|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlemurproject.indri.QueryEnvironment
public class QueryEnvironment
Field Summary | |
---|---|
protected boolean |
swigCMemOwn
|
private long |
swigCPtr
|
Constructor Summary | |
---|---|
|
QueryEnvironment()
|
protected |
QueryEnvironment(long cPtr,
boolean cMemoryOwn)
|
Method Summary | |
---|---|
void |
addIndex(java.lang.String pathname)
Add a local repository |
void |
addServer(java.lang.String hostname)
Add a remote server |
void |
close()
Close the QueryEnvironment. |
void |
delete()
|
long |
documentCount()
Return total number of documents in the collection. |
long |
documentCount(java.lang.String term)
Return total number of documents in the collection for the given term. |
int[] |
documentIDsFromMetadata(java.lang.String attributeName,
java.lang.String[] attributeValue)
Return a list of document IDs where the document has a metadata key that matches attributeName, with a value matching one of the attributeValues. |
int |
documentLength(int documentID)
Return all the length of a document. |
java.lang.String[] |
documentMetadata(int[] documentIDs,
java.lang.String attributeName)
Fetch the named metadata attribute for a list of document ids |
java.lang.String[] |
documentMetadata(ScoredExtentResult[] documentIDs,
java.lang.String attributeName)
Fetch the named metadata attribute for a list of ScoredExtentResults |
ParsedDocument[] |
documents(int[] documentIDs)
Fetch the parsed documents for a given list of ScoredExtentResults |
ParsedDocument[] |
documents(ScoredExtentResult[] results)
Fetch the parsed documents for a given list of ScoredExtentResults |
ParsedDocument[] |
documentsFromMetadata(java.lang.String attributeName,
java.lang.String[] attributeValue)
Fetch all documents with a metadata key that matches attributeName, with a value matching one of the attributeValues. |
DocumentVector[] |
documentVectors(int[] documentIDs)
Fetch a document vector for a list of documents. |
double |
expressionCount(java.lang.String expression)
Return the total number of times this expression appears in the collection. |
double |
expressionCount(java.lang.String expression,
java.lang.String queryType)
Return the total number of times this expression appears in the collection. |
ScoredExtentResult[] |
expressionList(java.lang.String expression)
Return all the occurrences of this expression in the collection. |
ScoredExtentResult[] |
expressionList(java.lang.String expression,
java.lang.String queryType)
Return all the occurrences of this expression in the collection. |
java.lang.String[] |
fieldList()
Return the list of fields. |
protected void |
finalize()
|
protected static long |
getCPtr(QueryEnvironment obj)
|
void |
removeIndex(java.lang.String pathname)
Remove a local repository |
void |
removeServer(java.lang.String hostname)
Remove a remote server |
QueryAnnotation |
runAnnotatedQuery(java.lang.String query,
int resultsRequested)
Run an Indri query language query. |
QueryAnnotation |
runAnnotatedQuery(java.lang.String query,
int[] documentSet,
int resultsRequested)
Run an Indri query language query on a set of documents. |
QueryResults |
runQuery(QueryRequest request)
Run an Indri query request |
ScoredExtentResult[] |
runQuery(java.lang.String query,
int resultsRequested)
Run an Indri query language query. |
ScoredExtentResult[] |
runQuery(java.lang.String query,
int[] documentSet,
int resultsRequested)
Run an Indri query language query on a set of documents. |
void |
setMemory(long memory)
Set the amount of memory to use. |
void |
setScoringRules(java.lang.String[] rules)
Set the scoring rules |
void |
setStopwords(java.lang.String[] stopwords)
Set the stopword list for query processing |
long |
termCount()
Return total number of terms. |
long |
termCount(java.lang.String term)
Return total number of term occurrences. |
long |
termFieldCount(java.lang.String term,
java.lang.String field)
Return total number of term occurrences within a field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long swigCPtr
protected boolean swigCMemOwn
Constructor Detail |
---|
protected QueryEnvironment(long cPtr, boolean cMemoryOwn)
public QueryEnvironment()
Method Detail |
---|
protected static long getCPtr(QueryEnvironment obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public void addServer(java.lang.String hostname) throws java.lang.Exception
hostname
- the host the server is running on
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void addIndex(java.lang.String pathname) throws java.lang.Exception
pathname
- the path to the repository.
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void removeServer(java.lang.String hostname) throws java.lang.Exception
hostname
- the host the server is running on
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void removeIndex(java.lang.String pathname) throws java.lang.Exception
pathname
- the path to the repository.
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void close() throws java.lang.Exception
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void setMemory(long memory) throws java.lang.Exception
memory
- number of bytes to allocate
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void setScoringRules(java.lang.String[] rules) throws java.lang.Exception
rules
- the vector of scoring rules.
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public void setStopwords(java.lang.String[] stopwords) throws java.lang.Exception
stopwords
- the list of stopwords
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ScoredExtentResult[] runQuery(java.lang.String query, int resultsRequested) throws java.lang.Exception
query
- the query to runresultsRequested
- maximum number of results to return
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ScoredExtentResult[] runQuery(java.lang.String query, int[] documentSet, int resultsRequested) throws java.lang.Exception
query
- the query to runresultsRequested
- maximum number of results to returndocumentSet
- the list of document ids to score.
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public QueryResults runQuery(QueryRequest request) throws java.lang.Exception
request
- the query request to run
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public QueryAnnotation runAnnotatedQuery(java.lang.String query, int resultsRequested) throws java.lang.Exception
query
- the query to runresultsRequested
- maximum number of results to return
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public QueryAnnotation runAnnotatedQuery(java.lang.String query, int[] documentSet, int resultsRequested) throws java.lang.Exception
query
- the query to rundocumentSet
- list of document ids to score.resultsRequested
- maximum number of results to return
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ParsedDocument[] documents(int[] documentIDs) throws java.lang.Exception
documentIDs
- the list of ScoredExtentResults
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ParsedDocument[] documents(ScoredExtentResult[] results) throws java.lang.Exception
results
- the list of ScoredExtentResults
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public java.lang.String[] documentMetadata(int[] documentIDs, java.lang.String attributeName) throws java.lang.Exception
documentIDs
- the list of idsattributeName
- the name of the metadata attribute
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public java.lang.String[] documentMetadata(ScoredExtentResult[] documentIDs, java.lang.String attributeName) throws java.lang.Exception
documentIDs
- the list of ScoredExtentResultsattributeName
- the name of the metadata attribute
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public int[] documentIDsFromMetadata(java.lang.String attributeName, java.lang.String[] attributeValue) throws java.lang.Exception
attributeName
- the name of the metadata attribute (e.g. 'url' or 'docno')attributeValue
- values that the metadata attribute should match
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ParsedDocument[] documentsFromMetadata(java.lang.String attributeName, java.lang.String[] attributeValue) throws java.lang.Exception
attributeName
- the name of the metadata attribute (e.g. 'url' or 'docno')attributeValues
- values that the metadata attribute should match
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public long termCount() throws java.lang.Exception
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public long termCount(java.lang.String term) throws java.lang.Exception
term
- the term to count
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public long termFieldCount(java.lang.String term, java.lang.String field) throws java.lang.Exception
term
- the term to countfield
- the name of the field
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public java.lang.String[] fieldList() throws java.lang.Exception
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public long documentCount() throws java.lang.Exception
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public long documentCount(java.lang.String term) throws java.lang.Exception
term
- the term to count documents for
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public DocumentVector[] documentVectors(int[] documentIDs) throws java.lang.Exception
documentIDs
- the vector of document ids.
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public double expressionCount(java.lang.String expression, java.lang.String queryType) throws java.lang.Exception
expression
- The expression to evaluate, probably an ordered or unordered window expression
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public double expressionCount(java.lang.String expression) throws java.lang.Exception
expression
- The expression to evaluate, probably an ordered or unordered window expression
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ScoredExtentResult[] expressionList(java.lang.String expression, java.lang.String queryType) throws java.lang.Exception
expression
- The expression to evaluate, probably an ordered or unordered window expression
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public ScoredExtentResult[] expressionList(java.lang.String expression) throws java.lang.Exception
expression
- The expression to evaluate, probably an ordered or unordered window expression
java.lang.Exception
- if a lemur::api::Exception was thrown by the JNI library.public int documentLength(int documentID) throws java.lang.Exception
documentID
- The internal document id.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |