org.compass.core.impl
Class DefaultCompassQueryBuilder.DefaultCompassQueryStringBuilder

java.lang.Object
  extended by org.compass.core.impl.DefaultCompassQueryBuilder.DefaultCompassQueryStringBuilder
All Implemented Interfaces:
CompassQueryBuilder.CompassQueryStringBuilder, CompassQueryBuilder.ToCompassQuery
Enclosing class:
DefaultCompassQueryBuilder

public class DefaultCompassQueryBuilder.DefaultCompassQueryStringBuilder
extends Object
implements CompassQueryBuilder.CompassQueryStringBuilder


Constructor Summary
DefaultCompassQueryBuilder.DefaultCompassQueryStringBuilder(SearchEngineQueryBuilder.SearchEngineQueryStringBuilder queryBuilder, InternalCompassSession session)
           
 
Method Summary
 CompassQueryBuilder.CompassQueryStringBuilder forceAnalyzer()
          Forces the query string to only use the analyzer specificed (or configured) and not take into account any analyzers that might be specifiec within the mappings.
 CompassQueryBuilder.CompassQueryStringBuilder setAnalyzer(String analyzer)
          Sets the analyzer that will be used to analyze the query string.
 CompassQueryBuilder.CompassQueryStringBuilder setAnalyzerByAlias(String alias)
          Sets the analyzer that will be used to analyzer the query string.
 CompassQueryBuilder.CompassQueryStringBuilder setDefaultSearchProperty(String defaultSearchProperty)
          Sets the default search property for non prefixed terms in the query string.
 CompassQueryBuilder.CompassQueryStringBuilder setQueryParser(String queryParser)
          Sets te query parser lookup name that will be used to parse the query string.
 CompassQuery toQuery()
          Create the query.
 CompassQueryBuilder.CompassQueryStringBuilder useAndDefaultOperator()
          Uses the and operator as the default operator instead of OR operator.
 CompassQueryBuilder.CompassQueryStringBuilder useOrDefaultOperator()
          Uses the OR operator as the default operator instead of AND operator.
 CompassQueryBuilder.CompassQueryStringBuilder useSpellCheck()
          Uses the spell check for suggesting a query based on the query string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCompassQueryBuilder.DefaultCompassQueryStringBuilder

public DefaultCompassQueryBuilder.DefaultCompassQueryStringBuilder(SearchEngineQueryBuilder.SearchEngineQueryStringBuilder queryBuilder,
                                                                   InternalCompassSession session)
Method Detail

setAnalyzer

public CompassQueryBuilder.CompassQueryStringBuilder setAnalyzer(String analyzer)
                                                          throws CompassException
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Sets the analyzer that will be used to analyze the query string. Can be null. It is used when parsing a query string and has no effect when using a bulit in query (using the CompassQuery).

Specified by:
setAnalyzer in interface CompassQueryBuilder.CompassQueryStringBuilder
Throws:
CompassException

setAnalyzerByAlias

public CompassQueryBuilder.CompassQueryStringBuilder setAnalyzerByAlias(String alias)
                                                                 throws CompassException
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Sets the analyzer that will be used to analyzer the query string. The analyzer will be built based on analyzer settings for the mapping definitions the define the alias. It means that if a certain property is associated with a specific analyzer, a per property analyzer will be built.

Specified by:
setAnalyzerByAlias in interface CompassQueryBuilder.CompassQueryStringBuilder
Throws:
CompassException

setQueryParser

public CompassQueryBuilder.CompassQueryStringBuilder setQueryParser(String queryParser)
                                                             throws CompassException
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Sets te query parser lookup name that will be used to parse the query string.

Specified by:
setQueryParser in interface CompassQueryBuilder.CompassQueryStringBuilder
Throws:
CompassException

useSpellCheck

public CompassQueryBuilder.CompassQueryStringBuilder useSpellCheck()
                                                            throws CompassException
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Uses the spell check for suggesting a query based on the query string.

Specified by:
useSpellCheck in interface CompassQueryBuilder.CompassQueryStringBuilder
Throws:
CompassException

setDefaultSearchProperty

public CompassQueryBuilder.CompassQueryStringBuilder setDefaultSearchProperty(String defaultSearchProperty)
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Sets the default search property for non prefixed terms in the query string. Can be null. It is used when parsing a query string and has no effect when using a bulit in query (using the CompassQuery).

Specified by:
setDefaultSearchProperty in interface CompassQueryBuilder.CompassQueryStringBuilder

useAndDefaultOperator

public CompassQueryBuilder.CompassQueryStringBuilder useAndDefaultOperator()
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Uses the and operator as the default operator instead of OR operator.

Specified by:
useAndDefaultOperator in interface CompassQueryBuilder.CompassQueryStringBuilder

useOrDefaultOperator

public CompassQueryBuilder.CompassQueryStringBuilder useOrDefaultOperator()
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Uses the OR operator as the default operator instead of AND operator.

Specified by:
useOrDefaultOperator in interface CompassQueryBuilder.CompassQueryStringBuilder

forceAnalyzer

public CompassQueryBuilder.CompassQueryStringBuilder forceAnalyzer()
Description copied from interface: CompassQueryBuilder.CompassQueryStringBuilder
Forces the query string to only use the analyzer specificed (or configured) and not take into account any analyzers that might be specifiec within the mappings.

Specified by:
forceAnalyzer in interface CompassQueryBuilder.CompassQueryStringBuilder

toQuery

public CompassQuery toQuery()
Description copied from interface: CompassQueryBuilder.ToCompassQuery
Create the query.

Specified by:
toQuery in interface CompassQueryBuilder.ToCompassQuery


Copyright (c) 2004-2008 The Compass Project.