Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.misc
Class ChainedFilter

    java.lang.Object
      org.apache.lucene.search.Filter
          org.apache.lucene.misc.ChainedFilter

All Implemented Interfaces:
  Serializable

    public class ChainedFilter

extends Filter

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.

Author:
  Kelvin Tan
See Also:
  Serialized Form

Field Summary
`static int` | `AND` `BitSet.and(java.util.BitSet)`.
`static int` | `ANDNOT` `BitSet.andNot(java.util.BitSet)`.
`static int` | `DEFAULT` Logical operation when none is declared.
`static int` | `OR` `BitSet.or(java.util.BitSet)`.
`static int` | `XOR` `BitSet.xor(java.util.BitSet)`.

Constructor Summary
`ChainedFilter(Filter[] chain)` Ctor.
`ChainedFilter(Filter[] chain, int logic)` Ctor.
`ChainedFilter(Filter[] chain, int[] logicArray)` Ctor.

Method Summary
`BitSet` | `bits(IndexReader reader)` `Filter.bits(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

### OR

    public static final int OR

  `BitSet.or(java.util.BitSet)`.

  See Also:
    Constant Field Values

### AND

    public static final int AND

  `BitSet.and(java.util.BitSet)`.

  See Also:
    Constant Field Values

### ANDNOT

    public static final int ANDNOT

  `BitSet.andNot(java.util.BitSet)`.

  See Also:
    Constant Field Values

### XOR

    public static final int XOR

  `BitSet.xor(java.util.BitSet)`.

  See Also:
    Constant Field Values

### DEFAULT

    public static int DEFAULT

  Logical operation when none is declared. Defaults to `BitSet.or(java.util.BitSet)`.

Constructor Detail

### ChainedFilter

    public ChainedFilter(Filter[] chain)

  Ctor.

  Parameters:
    `chain` - The chain of filters

### ChainedFilter

    public ChainedFilter(Filter[] chain,
                         int[] logicArray)

  Ctor.

  Parameters:
    `chain` - The chain of filters
    `logicArray` - Logical operations to apply between filters

### ChainedFilter

    public ChainedFilter(Filter[] chain,
                         int logic)

  Ctor.

  Parameters:
    `chain` - The chain of filters
    `logic` - Logicial operation to apply to ALL filters

Method Detail

### bits

    public BitSet bits(IndexReader reader)
                throws IOException

  `Filter.bits(org.apache.lucene.index.IndexReader)`.

  Specified by:
    `bits` in class `Filter`
  Throws:
    `IOException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.