org.mmbase.storage.search
Interface SearchQueryHandler

All Known Implementing Classes:
BasicQueryHandler

public interface SearchQueryHandler

Defines methods for an object that handles search query requests.

Since:
MMBase-1.7
Version:
$Id: SearchQueryHandler.java,v 1.4 2005/12/10 14:21:57 michiel Exp $
Author:
Rob van Maris

Field Summary
static int FEATURE_MAX_NUMBER
          Feature that allows specifying the maximum number of results to be returned.
static int FEATURE_OFFSET
          Feature that allows specifying an index in the list of results, as a starting popublic final static int for results to be returned.
static int FEATURE_REGEXP
          Feature that allows to search on string by a regular expression.
static int SUPPORT_NONE
          Support level for features that are not supported.
static int SUPPORT_NORMAL
          Support level for features that are available for use under normal circumstances.
static int SUPPORT_OPTIMAL
          Support level for features that are optimally supported.
static int SUPPORT_WEAK
          Support level for features that are supported, but not recommended when performance is critical.
 
Method Summary
 List getNodes(SearchQuery query, MMObjectBuilder builder)
          Processes a search query, returns the result as a list of nodes.
 int getSupportLevel(Constraint constraint, SearchQuery query)
          Gets the level at which a constraint is supported for a query by this handler.
 int getSupportLevel(int feature, SearchQuery query)
          Gets the level at which a feature is supported for a query by this handler.
 

Field Detail

SUPPORT_NONE

public static final int SUPPORT_NONE
Support level for features that are not supported.

See Also:
Constant Field Values

SUPPORT_WEAK

public static final int SUPPORT_WEAK
Support level for features that are supported, but not recommended when performance is critical.

See Also:
Constant Field Values

SUPPORT_NORMAL

public static final int SUPPORT_NORMAL
Support level for features that are available for use under normal circumstances.

See Also:
Constant Field Values

SUPPORT_OPTIMAL

public static final int SUPPORT_OPTIMAL
Support level for features that are optimally supported. This applies also to features that are supported without a significant impact on performance penalty.

See Also:
Constant Field Values

FEATURE_MAX_NUMBER

public static final int FEATURE_MAX_NUMBER
Feature that allows specifying the maximum number of results to be returned.

See Also:
SearchQuery.getMaxNumber(), Constant Field Values

FEATURE_OFFSET

public static final int FEATURE_OFFSET
Feature that allows specifying an index in the list of results, as a starting popublic final static int for results to be returned.

See Also:
SearchQuery.getOffset(), Constant Field Values

FEATURE_REGEXP

public static final int FEATURE_REGEXP
Feature that allows to search on string by a regular expression.

See Also:
SearchQuery.getOffset(), Constant Field Values
Method Detail

getSupportLevel

public int getSupportLevel(int feature,
                           SearchQuery query)
                    throws SearchQueryException
Gets the level at which a feature is supported for a query by this handler. This is one of either: Given the choice, the query handler with the highest level of support is prefered.

Throws:
SearchQueryException

getSupportLevel

public int getSupportLevel(Constraint constraint,
                           SearchQuery query)
                    throws SearchQueryException
Gets the level at which a constraint is supported for a query by this handler. This is one of either: Given the choice, the query handler with the highest level of support is prefered.

Throws:
SearchQueryException

getNodes

public List getNodes(SearchQuery query,
                     MMObjectBuilder builder)
              throws SearchQueryException
Processes a search query, returns the result as a list of nodes. Depending on the specified builder, the results will be:

Parameters:
query - The search query.
builder - The builder for the result nodes. Specify a ResultBuilder to get resultnodes. ClusterBuilder to get clusternodes.
Returns:
The resulting nodes.
Throws:
SearchQueryException
See Also:
ResultNode, ClusterNode


MMBase build 1.8.1.20060716