org.apache.lucene.search

## Class RemoteCachingWrapperFilter

- java.lang.Object
- - org.apache.lucene.search.Filter
  - - org.apache.lucene.search.RemoteCachingWrapperFilter

- All Implemented Interfaces:
    java.io.Serializable

      public class RemoteCachingWrapperFilter
      extends org.apache.lucene.search.Filter

  Provides caching of `Filter`s 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));

  Version:
    $Id:$
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.lucene.search.Filter` | `filter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteCachingWrapperFilter(org.apache.lucene.search.Filter filter)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.BitSet` | `bits(org.apache.lucene.index.IndexReader reader)` Deprecated. Use `getDocIdSet(IndexReader)` instead.
    `org.apache.lucene.search.DocIdSet` | `getDocIdSet(org.apache.lucene.index.IndexReader reader)` Uses the `FilterManager` to keep the cache for a filter on the searcher side of a remote connection.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### filter

          protected org.apache.lucene.search.Filter filter

  - ### Constructor Detail

    - #### RemoteCachingWrapperFilter

          public RemoteCachingWrapperFilter(org.apache.lucene.search.Filter filter)

  - ### Method Detail

    - #### bits

          public java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
                                throws java.io.IOException

      Deprecated. Use `getDocIdSet(IndexReader)` instead.
      Uses the `FilterManager` to keep the cache for a filter on the searcher side of a remote connection.
      Overrides:
        `bits` in class `org.apache.lucene.search.Filter`
      Parameters:
        `reader` - the index reader for the Filter
      Returns:
        the bitset
      Throws:
        `java.io.IOException`

    - #### getDocIdSet

          public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.IndexReader reader)
                                                        throws java.io.IOException

      Uses the `FilterManager` to keep the cache for a filter on the searcher side of a remote connection.
      Overrides:
        `getDocIdSet` in class `org.apache.lucene.search.Filter`
      Parameters:
        `reader` - the index reader for the Filter
      Returns:
        the DocIdSet
      Throws:
        `java.io.IOException`

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