fr.gouv.culture.sdx.search.lucene.query
Class FieldQuery
java.lang.Object
fr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
fr.gouv.culture.sdx.search.lucene.query.FieldQuery
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, Query, Query, SdxObject, org.apache.cocoon.xml.XMLizable
- public class FieldQuery
- extends AbstractQuery
A search acceptRequest by field.
Research is carried out in the values of a field,
according to the type of field. Thus, for a field of
the type "date", the required value is initially converted
into a Date object.
For the fields of the "word" or "field"
type, generic characters and? are supported
Constructor Summary |
FieldQuery()
Creates a query
A logger must be set and then this query must be setUp. |
Method Summary |
void |
setUp(SearchLocations sLocs,
java.lang.String q,
java.lang.String fieldName)
Builds a 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 |
FieldQuery
public FieldQuery()
- 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 q,
java.lang.String fieldName)
throws SDXException
- Builds a field query.
- Parameters:
sLocs
- The SearchLocations (indices to be searched).fieldName
- The name of 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.