Class FilterBundle


  • public class FilterBundle
    extends Object
    FilterBundle is a container for all the goodies used for producing filtered cursors, a ImmutableBitmap if the filter can use an index, and/or a FilterBundle.MatcherBundle which contains functions to build ValueMatcher and VectorValueMatcher for any filters which must be evaluated row by row during the cursor scan. Cursors will use everything that is non-null, and at least one of index or matcher bundle MUST be set. If both index and matcher is present, the cursor will effectively perform a logical AND operation; i.e. if the index matches a row then the value matcher must also match the row for the cursor to provide it to the selectors built on top of it.

    There are a few cases where the filter should set both indexes and matchers. For example, if the filter is a composite filter which can be partitioned, such as AndFilter, then the filter can be partitioned due to the intersection nature of AND, so the index can be set to reduce the number of rows and the matcher bundle will build a matcher which will filter the remainder. This strategy of having both an index and a matcher can also can model the case where the index is an inexact match and so a matcher must be used to ensure that the remaining values actually match the filter.