org.apache.lucene.search

Class RemoteCachingWrapperFilter

public class RemoteCachingWrapperFilter extends Filter

Provides caching of Filters themselves on the remote end of an RMI connection. The cache is keyed on Filter's hashCode(), so if it sees the same filter twice it will reuse the original version.

NOTE: This does NOT cache the Filter bits, but rather the Filter itself. Thus, this works hand-in-hand with CachingWrapperFilter to keep both file Filter cache and the Filter bits on the remote end, close to the searcher.

Usage:

To cache a result you must do something like RemoteCachingWrapperFilter f = new RemoteCachingWrapperFilter(new CachingWrapperFilter(myFilter));

Author: Matt Ericson

Field Summary
protected Filterfilter
Constructor Summary
RemoteCachingWrapperFilter(Filter filter)
Method Summary
BitSetbits(IndexReader reader)
Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.

Field Detail

filter

protected Filter filter

Constructor Detail

RemoteCachingWrapperFilter

public RemoteCachingWrapperFilter(Filter filter)

Method Detail

bits

public BitSet bits(IndexReader reader)
Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.

Parameters: reader the index reader for the Filter

Returns: the bitset

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