fr.gouv.culture.sdx.search.lucene.query
Class ExactFieldQuery
java.lang.Object
fr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
fr.gouv.culture.sdx.search.lucene.query.ExactFieldQuery
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, Query, Query, SdxObject, org.apache.cocoon.xml.XMLizable
- public class ExactFieldQuery
- extends AbstractQuery
Contains an exact acceptRequest on a term in a field.
No treatment is carried out on this acceptRequest.
To carry out a research on a term in a field,
in a general way, it is preferable to use the FieldQuery class,
which takes account of the type of field.
Constructor Summary |
ExactFieldQuery()
Creates a query
A logger must be set and then this query must be setUp. |
Method Summary |
void |
setUp(SearchLocations sLocs,
java.lang.String fieldName,
java.lang.String q)
Builds an exact field query. |
void |
toSAX(org.xml.sax.ContentHandler hdl)
Formats a query in XML. |
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 |
ExactFieldQuery
public ExactFieldQuery()
- 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 fieldName,
java.lang.String q)
throws SDXException
- Builds an exact field query.
- Parameters:
sLocs
- The SearchLocationsindex to be searched.fieldName
- The field to search (if null or non existant, the default field will be searched).q
- The query string.
- Throws:
SDXException
toSAX
public void toSAX(org.xml.sax.ContentHandler hdl)
throws org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
- Formats a query in XML.
- Specified by:
toSAX
in interface Query
- Specified by:
toSAX
in class AbstractQuery
- Parameters:
hdl
- A content handler to receive XML data.
- Throws:
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.