fr.gouv.culture.sdx.search.lucene.query
Class SimpleQuery
java.lang.Object
fr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
fr.gouv.culture.sdx.search.lucene.query.SimpleQuery
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, Query, Query, SdxObject, org.apache.cocoon.xml.XMLizable
- Direct Known Subclasses:
- RestrictedQuery
- public class SimpleQuery
- extends AbstractQuery
A simple query.
A simple query is passed directly to Lucene. It is supposed to use the Lucene query syntax.
Constructor Summary |
SimpleQuery()
Creates a query
A logger must be set and then this query must be setUp. |
Method Summary |
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 acceptRequest. |
Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery |
addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, enableLogging, execute, getLuceneQuery, getOperator, getSearchLocations, prepare, setLuceneQuery, setSearchLocations, setUp, setUp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleQuery
public SimpleQuery()
- Creates a query
A logger must be set and then this query must be setUp.
- See Also:
AbstractQuery.enableLogging(org.apache.avalon.framework.logger.Logger)
,
setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations, java.lang.String, java.lang.String)
setUp
public void setUp(SearchLocations sLocs,
java.lang.String defaultField,
java.lang.String q)
throws SDXException
- Builds a simple query.
- Parameters:
sLocs
- The SearchLocations object (indices to be searched).q
- The query string.
- Throws:
SDXException
setUp
public void setUp(SearchLocations sLocs,
java.lang.String defaultField,
java.lang.String q,
int operator)
throws SDXException
- Builds a simple query.
- Parameters:
sLocs
- The SearchLocations object (indices to be searched).q
- The query string.operator
- The operator for the query (ie AND or OR).
- Throws:
SDXException
- See Also:
QueryParser.DEFAULT_OPERATOR
,
QueryParser.OPERATOR_AND
,
QueryParser.OPERATOR_OR
toSAX
public void toSAX(org.xml.sax.ContentHandler hdl)
throws org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
- Returns a SAX representation of this acceptRequest.
- Specified by:
toSAX
in interface Query
- Specified by:
toSAX
in class AbstractQuery
- Parameters:
hdl
- The ContentHandler to feed with events.
- Throws:
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.