|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.test.SEMain
com.sun.labs.minion.test.QueryTest
public class QueryTest
QueryTest is a set of utility methods and a query interface to operate on
an index. Run QueryTest with the "-d
In addition, you can put "\n" or "\t" for a newline or a space. Arguments should be separated with spaces. The number of results displayed can be changed with the ":n" command.
By default, results are sorted according to their score. Results with the
highest score are printed first. The sorting specification can be changed
by using the ":sort" command and giving it a sorting spec, as defined
in the SearchEngine interface. To get the
default sort back, use ":sort -score".
To see the full set of commands available, use the ":help" command. To exit QueryTest cleanly, use the ":q" command.
| Nested Class Summary | |
|---|---|
protected class |
QueryTest.DisplaySpec
A class that is used to format for display the information from a document hit. |
| Field Summary | |
|---|---|
protected boolean |
complexPassDisplay
|
protected Unsupervised.Model |
currModel
|
protected static boolean |
DEBUG
|
protected boolean |
displayPassage
|
protected QueryTest.DisplaySpec |
displaySpec
|
protected SearchEngineImpl |
engine
|
protected int |
grammar
|
protected java.util.logging.Logger |
logger
|
protected static java.lang.String |
logTag
|
protected PartitionManager |
manager
|
protected LiteMorph |
morphEn
|
protected int |
nHits
|
protected long |
nQueries
|
protected java.io.PrintStream |
output
|
protected java.lang.String |
prompt
|
protected int |
queryOp
|
protected java.text.DecimalFormat |
scoreForm
|
protected Searcher |
searcher
|
protected java.lang.String |
sortSpec
|
protected long |
totalTime
|
protected boolean |
ttyInput
|
protected boolean |
vectorLengthNormalization
|
protected boolean |
wildCaseSensitive
|
| Constructor Summary | |
|---|---|
QueryTest(java.net.URL cmFile,
java.lang.String indexDir,
java.lang.String engineType,
java.lang.String ds,
java.lang.String ss,
java.io.PrintStream output)
|
|
| Method Summary | |
|---|---|
void |
displayResults(ResultSet set)
|
void |
displayResults(java.lang.String prefix,
ResultSet set)
Displays the top n results from a set of results. |
void |
help()
|
static void |
main(java.lang.String[] args)
|
protected java.lang.String[] |
parseMessage(java.lang.String message)
Parses the given message into an array of strings. |
protected int |
processCommand(java.lang.String q)
|
protected void |
queryStats()
|
void |
setPrompt()
Sets the prompt to show which of the toggles are on. |
void |
stats()
|
static void |
usage()
|
| Methods inherited from class com.sun.labs.minion.test.SEMain |
|---|
makeDocument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.logging.Logger logger
protected static final java.lang.String logTag
protected static final boolean DEBUG
protected java.text.DecimalFormat scoreForm
protected boolean displayPassage
protected boolean complexPassDisplay
protected boolean wildCaseSensitive
protected boolean vectorLengthNormalization
protected QueryTest.DisplaySpec displaySpec
protected java.lang.String sortSpec
protected java.lang.String prompt
protected Searcher searcher
protected SearchEngineImpl engine
protected PartitionManager manager
protected LiteMorph morphEn
protected int nHits
protected long totalTime
protected long nQueries
protected int grammar
protected int queryOp
protected boolean ttyInput
protected Unsupervised.Model currModel
protected java.io.PrintStream output
| Constructor Detail |
|---|
public QueryTest(java.net.URL cmFile,
java.lang.String indexDir,
java.lang.String engineType,
java.lang.String ds,
java.lang.String ss,
java.io.PrintStream output)
throws java.io.IOException,
SearchEngineException
java.io.IOException
SearchEngineException| Method Detail |
|---|
public void help()
public static void usage()
public void stats()
public void setPrompt()
public void displayResults(ResultSet set)
public void displayResults(java.lang.String prefix,
ResultSet set)
protected void queryStats()
protected java.lang.String[] parseMessage(java.lang.String message)
message - the string to be parsed.
protected int processCommand(java.lang.String q)
public static void main(java.lang.String[] args)
throws java.io.IOException,
java.lang.NumberFormatException,
SearchEngineException
java.io.IOException
java.lang.NumberFormatException
SearchEngineException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||