no.sesat.search.query
Interface Query

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractQuery

public interface Query
extends Serializable

A Query represents a users inputted query string. The query contains an heirarchy of Clause objects implemented against a visitor pattern that visitors are free to use.

Version:
$Id: Query.java 7225 2009-04-09 00:32:20Z ssmiweve $

Method Summary
 TokenEvaluationEngine.State getEvaluationState()
          Returns the object that holds State for any TokenEvaluationEngine actions.
 LeafClause getFirstLeafClause()
          The first term (leaf clause) in the query.
 ParentFinder getParentFinder()
          Returns the ParentFinder instance applicable for this query.
 String getQueryString()
          The original string the user entered for the search.
 Clause getRootClause()
          The root clause to the clause heirarchy.
 int getTermCount()
          Return the number of terms in this query.
 boolean isBlank()
          Is the query blank (or just full of useless symbols).
 

Method Detail

getRootClause

Clause getRootClause()
The root clause to the clause heirarchy. Will always be an operation clause if more than one term exists in the query.

Returns:
the root clause.

getQueryString

String getQueryString()
The original string the user entered for the search. This string should never be used programmatically or passed to search indexes. It is only intended for display and feedback.

Returns:
the original user's query.

getFirstLeafClause

LeafClause getFirstLeafClause()
The first term (leaf clause) in the query.

Returns:
the first leaf clause.

getTermCount

int getTermCount()
Return the number of terms in this query. Terms are represented by LeafClauses.

Returns:

isBlank

boolean isBlank()
Is the query blank (or just full of useless symbols).

Returns:

getParentFinder

ParentFinder getParentFinder()
Returns the ParentFinder instance applicable for this query. The ParentFinder keeps a cache of parent-finds so it's useful to store an instance against the Query like this.

Returns:
the ParentFinder instance applicable for this query.

getEvaluationState

TokenEvaluationEngine.State getEvaluationState()
Returns the object that holds State for any TokenEvaluationEngine actions.

Returns:
the object that holds State for any TokenEvaluationEngine actions.


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.