BooleanFilter (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.BooleanFilter class

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.search
Class BooleanFilter

    java.lang.Object
      org.apache.lucene.search.Filter
          org.apache.lucene.search.BooleanFilter

All Implemented Interfaces:
  Serializable

    public class BooleanFilter

extends Filter

A container Filter that allows Boolean composition of Filters. Filters are allocated into one of three logical constructs; SHOULD, MUST NOT, MUST The results Filter BitSet is constructed as follows: SHOULD Filters are OR'd together The resulting Filter is NOT'd with the NOT Filters The resulting Filter is AND'd with the MUST Filters

See Also:
  Serialized Form

Constructor Summary
`BooleanFilter()`

Method Summary
`void` | `add(FilterClause filterClause)` Adds a new FilterClause to the Boolean Filter container
`boolean` | `equals(Object obj)`
`protected DocIdSet` | `finalResult(OpenBitSetDISI result, int maxDocs)` Provide a SortedVIntList when it is definitely smaller than an OpenBitSet
`DocIdSet` | `getDocIdSet(IndexReader reader)` Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.
`int` | `hashCode()`
`String` | `toString()` Prints a user-readable version of this query.

Methods inherited from class org.apache.lucene.search.Filter
`bits`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BooleanFilter

    public BooleanFilter()

Method Detail

### getDocIdSet

    public DocIdSet getDocIdSet(IndexReader reader)
                         throws IOException

  Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.

  Overrides:
    `getDocIdSet` in class `Filter`
  Returns:
    a DocIdSet that provides the documents which should be permitted or prohibited in search results.
  Throws:
    `IOException`
  See Also:
    `DocIdBitSet`

### finalResult

    protected DocIdSet finalResult(OpenBitSetDISI result,
                                   int maxDocs)

  Provide a SortedVIntList when it is definitely smaller than an OpenBitSet

### add

    public void add(FilterClause filterClause)

  Adds a new FilterClause to the Boolean Filter container

  Parameters:
    `filterClause` - A FilterClause object containing a Filter and an Occur parameter

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Prints a user-readable version of this query.

  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-2009 Apache Software Foundation. All Rights Reserved.