org.compass.core.lucene.engine.queryparser
Class DefaultLuceneQueryParser

java.lang.Object
  extended by org.compass.core.lucene.engine.queryparser.DefaultLuceneQueryParser
All Implemented Interfaces:
CompassConfigurable, CompassMappingAware, SearchEngineFactoryAware, LuceneQueryParser
Direct Known Subclasses:
SpellCheckLuceneQueryParser

public class DefaultLuceneQueryParser
extends Object
implements LuceneQueryParser, CompassMappingAware, SearchEngineFactoryAware, CompassConfigurable

The deafult Lucene query parser. Uses LuceneEnvironment.QueryParser.DEFAULT_PARSER_ALLOW_LEADING_WILDCARD

Author:
kimchy

Constructor Summary
DefaultLuceneQueryParser()
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
protected  CompassMultiFieldQueryParser createMultiQueryParser(String[] properties, Analyzer analyzer, boolean forceAnalyzer)
           
protected  CompassQueryParser createQueryParser(String property, Analyzer analyzer, boolean forceAnalyzer)
           
protected  CompassMapping getMapping()
           
protected  SearchEngineFactory getSearchEngineFactory()
           
 QueryHolder parse(String[] properties, QueryParser.Operator operator, Analyzer analyzer, boolean forceAnalyzer, String queryString)
           
 QueryHolder parse(String property, QueryParser.Operator operator, Analyzer analyzer, boolean forceAnalyzer, String queryString)
           
 void setCompassMapping(CompassMapping mapping)
          Injects the component with the compass mappings.
 void setSearchEngineFactory(SearchEngineFactory searchEngineFactory)
          Injects the search engine factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLuceneQueryParser

public DefaultLuceneQueryParser()
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

setCompassMapping

public void setCompassMapping(CompassMapping mapping)
Description copied from interface: CompassMappingAware
Injects the component with the compass mappings.

Specified by:
setCompassMapping in interface CompassMappingAware

setSearchEngineFactory

public void setSearchEngineFactory(SearchEngineFactory searchEngineFactory)
Description copied from interface: SearchEngineFactoryAware
Injects the search engine factory.

Specified by:
setSearchEngineFactory in interface SearchEngineFactoryAware

parse

public QueryHolder parse(String property,
                         QueryParser.Operator operator,
                         Analyzer analyzer,
                         boolean forceAnalyzer,
                         String queryString)
                  throws SearchEngineQueryParseException
Specified by:
parse in interface LuceneQueryParser
Throws:
SearchEngineQueryParseException

parse

public QueryHolder parse(String[] properties,
                         QueryParser.Operator operator,
                         Analyzer analyzer,
                         boolean forceAnalyzer,
                         String queryString)
                  throws SearchEngineQueryParseException
Specified by:
parse in interface LuceneQueryParser
Throws:
SearchEngineQueryParseException

getMapping

protected CompassMapping getMapping()

getSearchEngineFactory

protected SearchEngineFactory getSearchEngineFactory()

createQueryParser

protected CompassQueryParser createQueryParser(String property,
                                               Analyzer analyzer,
                                               boolean forceAnalyzer)

createMultiQueryParser

protected CompassMultiFieldQueryParser createMultiQueryParser(String[] properties,
                                                              Analyzer analyzer,
                                                              boolean forceAnalyzer)


Copyright (c) 2004-2009 The Compass Project.