|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.Filter fr.gouv.culture.sdx.search.lucene.filter.AbstractFilter fr.gouv.culture.sdx.search.lucene.filter.Filter
public class Filter
A filter on a base of documents. This definition of filter is very generic. It is composed of a tree of criteria (Criteria objects), these criteria being connected by Boolean operators (AND or OR). One identifies the documents which respect this filter by making a Boolean logic adapted for each criteria.
Field Summary | |
---|---|
static int |
BOOLEAN_OPERATOR_AND
The "AND" operator |
static int |
BOOLEAN_OPERATOR_NOT
The "NOT" operator |
static int |
BOOLEAN_OPERATOR_OR
The "OR" operator |
Fields inherited from class fr.gouv.culture.sdx.search.lucene.filter.AbstractFilter |
---|
logger |
Constructor Summary | |
---|---|
Filter()
|
|
Filter(int operator)
Constructs a new filter with the specified operator |
Method Summary | |
---|---|
void |
add(FilterCriteria criteria)
Adds a criteria to the list. |
java.util.BitSet |
bits(org.apache.lucene.index.IndexReader r)
Returns a list of documents which respect this filter. |
void |
setUp(int operator)
Builds a filter of several criterion connected by an operator. |
void |
toSAX(org.xml.sax.ContentHandler hdl)
Returns a SAX representation of this criteria. |
Methods inherited from class fr.gouv.culture.sdx.search.lucene.filter.AbstractFilter |
---|
enableLogging |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BOOLEAN_OPERATOR_AND
public static final int BOOLEAN_OPERATOR_OR
public static final int BOOLEAN_OPERATOR_NOT
Constructor Detail |
---|
public Filter()
public Filter(int operator)
operator
- The operator for the filterMethod Detail |
---|
public void setUp(int operator)
operator
- The operator (AND or OR) connecting the criterion .public void add(FilterCriteria criteria)
criteria
- A criteria or a list of criterionpublic java.util.BitSet bits(org.apache.lucene.index.IndexReader r)
bits
in interface FilterCriteria
bits
in class AbstractFilter
r
- An object for reading the index.public void toSAX(org.xml.sax.ContentHandler hdl) throws org.xml.sax.SAXException
hdl
- The ContentHandler to which the events will be supplied.
org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |