|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.Filter org.apache.lucene.search.ChainedFilter
public class ChainedFilter
Allows multiple Filter
s to be chained.
Logical operations such as NOT and XOR
are applied between filters. One operation can be used
for all filters, or a specific operation can be declared
for each filter.
Order in which filters are called depends on the position of the filter in the chain. It's probably more efficient to place the most restrictive filters /least computationally-intensive filters first.
Field Summary | |
---|---|
static int |
AND
|
static int |
ANDNOT
|
static int |
DEFAULT
Logical operation when none is declared. |
static int |
OR
|
static int |
XOR
|
Constructor Summary | |
---|---|
ChainedFilter(Filter[] chain)
Ctor. |
|
ChainedFilter(Filter[] chain,
int logic)
Ctor. |
|
ChainedFilter(Filter[] chain,
int[] logicArray)
Ctor. |
Method Summary | |
---|---|
protected DocIdSet |
finalResult(OpenBitSetDISI result,
int maxDocs)
Deprecated. Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0 |
DocIdSet |
getDocIdSet(IndexReader reader)
Filter.getDocIdSet(org.apache.lucene.index.IndexReader) . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int OR
public static final int AND
public static final int ANDNOT
public static final int XOR
public static int DEFAULT
Constructor Detail |
---|
public ChainedFilter(Filter[] chain)
chain
- The chain of filterspublic ChainedFilter(Filter[] chain, int[] logicArray)
chain
- The chain of filterslogicArray
- Logical operations to apply between filterspublic ChainedFilter(Filter[] chain, int logic)
chain
- The chain of filterslogic
- Logical operation to apply to ALL filtersMethod Detail |
---|
public DocIdSet getDocIdSet(IndexReader reader) throws IOException
Filter.getDocIdSet(org.apache.lucene.index.IndexReader)
.
getDocIdSet
in class Filter
reader
- a IndexReader
instance opened on the index currently
searched on. Note, it is likely that the provided reader does not
represent the whole underlying index i.e. if the index has more than
one segment the given reader only represents a single segment.
IOException
DocIdBitSet
@Deprecated protected final DocIdSet finalResult(OpenBitSetDISI result, int maxDocs)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |