it.unimi.dsi.mg4j.query
Class Query

java.lang.Object
  extended byit.unimi.dsi.mg4j.query.Query

public class Query
extends Object

A command-line interpreter to query indices.


Method Summary
static void displayModeOutput(DocumentIterator result, List titles)
          Scores the given document iterator and produces score output.
static void interpretCommand(String command)
          Interpret the given command, changing the static variables.
static void main(String[] arg)
          The main method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

interpretCommand

public static void interpretCommand(String command)
Interpret the given command, changing the static variables. Possible commands are
         !display    <-- pass to display-mode
         !score ScorerClassName   <-- use the given scorer (default constructor)
         !output n   <-- output at most n lines (0=all)+
  

Parameters:
command - the command.

displayModeOutput

public static void displayModeOutput(DocumentIterator result,
                                     List titles)
Scores the given document iterator and produces score output.

Parameters:
result - the document iterator.
titles - an optional list of titles, or null.

main

public static void main(String[] arg)
                 throws ParseException,
                        TokenMgrError,
                        IOException,
                        ClassNotFoundException
The main method. Reads a query from standard input and parses it.

Throws:
ParseException
TokenMgrError
IOException
ClassNotFoundException