com.sun.labs.minion
Interface Searcher

All Known Subinterfaces:
SearchEngine
All Known Implementing Classes:
SearchEngineImpl

public interface Searcher

An interface for things that know how to run a search.


Field Summary
static int GRAMMAR_LUCENE
           
static int GRAMMAR_STRICT
           
static int GRAMMAR_WEB
           
static java.lang.String[] GRAMMARS
           
static int OP_AND
           
static int OP_OR
           
static int OP_PAND
           
 
Method Summary
 ResultSet search(java.lang.String query)
          Runs a query against the engines, returning a set of results.
 ResultSet search(java.lang.String query, java.lang.String sortOrder)
          Runs a query against the engines, returning a set of results.
 ResultSet search(java.lang.String query, java.lang.String sortOrder, int defaultOperator, int grammar)
          Runs a query against the engines, returning a set of results.
 

Field Detail

OP_PAND

static final int OP_PAND
See Also:
Constant Field Values

OP_AND

static final int OP_AND
See Also:
Constant Field Values

OP_OR

static final int OP_OR
See Also:
Constant Field Values

GRAMMAR_WEB

static final int GRAMMAR_WEB
See Also:
Constant Field Values

GRAMMAR_STRICT

static final int GRAMMAR_STRICT
See Also:
Constant Field Values

GRAMMAR_LUCENE

static final int GRAMMAR_LUCENE
See Also:
Constant Field Values

GRAMMARS

static final java.lang.String[] GRAMMARS
Method Detail

search

ResultSet search(java.lang.String query)
                 throws SearchEngineException
Runs a query against the engines, returning a set of results.

Parameters:
query - The query to run, in our query syntax.
Returns:
a set of results containing the documents that match the query
Throws:
SearchEngineException

search

ResultSet search(java.lang.String query,
                 java.lang.String sortOrder)
                 throws SearchEngineException
Runs a query against the engines, returning a set of results.

Parameters:
query - The query to run, in our query syntax.
sortOrder - How the results should be sorted. This is a set of comma-separated saved field names, each preceeded by a + (for increasing order) or by a - (for decreasing order).
Returns:
a set of results containing the documents that match the query
Throws:
SearchEngineException

search

ResultSet search(java.lang.String query,
                 java.lang.String sortOrder,
                 int defaultOperator,
                 int grammar)
                 throws SearchEngineException
Runs a query against the engines, returning a set of results.

Parameters:
query - The query to run, in our query syntax.
sortOrder - How the results should be sorted. This is a set of comma-separated field names, each preceeded by a + (for increasing order) or by a - (for decreasing order).
defaultOperator - the operator to use between terms when none is specified in the query will be used to filter the results generated by the main query. This may be null if there are no filters required.
grammar - specifies the grammar to use to parse the query. Valid values ar edefined in the Searcher interface
Throws:
SearchEngineException