public class SimpleQuery extends AbstractQuery
A simple query is passed directly to Lucene. It is supposed to use the Lucene query syntax.
SdxObject.ConfigurationNode
baseOperator, baseQuery, baseResults, cachedQuery, filter, luceneQuery, queryText, searchLocations, sortSpecification
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized
defaultOperator, LUCENE_BOOLEAN_QUERY_MAX_CLAUSES, OPERATOR_AND, OPERATOR_NOT, OPERATOR_OR, SEARCH_ENGINE
CLASS_NAME_SUFFIX
DEFAULT_ENCODING
Constructor and Description |
---|
SimpleQuery()
Creates a query
A super.getLog() must be set and then this query must be setUp.
|
Modifier and Type | Method and Description |
---|---|
void |
setUp(SearchLocations sLocs,
java.lang.String defaultField,
java.lang.String q)
Builds a simple query.
|
void |
setUp(SearchLocations sLocs,
java.lang.String defaultField,
java.lang.String q,
int operator)
Builds a simple query.
|
void |
toSAX(org.xml.sax.ContentHandler hdl)
Returns a SAX representation of this query.
|
addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, execute, getBoost, getCachedQuery, getClassNameSuffix, getLuceneQuery, getOperator, getSearchLocations, initToSax, initVolatileObjectsToSax, prepare, setBoost, setBoost, setLuceneQuery, setSearchLocations, setUp, setUp
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, verifyConfigurationResources
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, setId
getDescription, setDescription
getEncoding, setEncoding
getLocale, getXmlLang, setLocale, setXmlLang
public SimpleQuery()
A super.getLog() must be set and then this query must be setUp.
public void setUp(SearchLocations sLocs, java.lang.String defaultField, java.lang.String q) throws SDXException
sLocs
- The SearchLocations object (indices to be searched).q
- The query string.SDXException
public void setUp(SearchLocations sLocs, java.lang.String defaultField, java.lang.String q, int operator) throws SDXException
sLocs
- The SearchLocations object (indices to be searched).q
- The query string.operator
- The operator for the query (ie AND or OR).SDXException
QueryParser.DEFAULT_OPERATOR
,
QueryParser.OPERATOR_AND
,
QueryParser.OPERATOR_OR
public void toSAX(org.xml.sax.ContentHandler hdl) throws org.xml.sax.SAXException
toSAX
in interface org.apache.excalibur.xml.sax.XMLizable
toSAX
in class AbstractQuery
hdl
- The ContentHandler to feed with events.org.xml.sax.SAXException
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.