org.apache.solr.search

## Interface PostFilter

- All Superinterfaces:
    ExtendedQuery
  All Known Implementing Classes:
    AnalyticsQuery, CollapsingQParserPlugin.CollapsingPostFilter, FunctionRangeQuery

      public interface PostFilter
      extends ExtendedQuery

  The PostFilter interface provides a mechanism to further filter documents after they have already gone through the main query and other filters. This is appropriate for filters with a very high cost.

  The filtering mechanism used is a `DelegatingCollector` that allows the filter to not call the delegate for certain documents, thus effectively filtering them out. This also avoids the normal filter advancing mechanism which asks for the first acceptable document on or after the target (which is undesirable for expensive filters). This collector interface also enables better performance when an external system must be consulted, since document ids may be buffered and batched into a single request to the external system.

  Implementations of this interface must also be a Query. If an implementation can only support the collector method of filtering through getFilterCollector, then ExtendedQuery.getCached() should always return false, and ExtendedQuery.getCost() should return no less than 100.

  See Also:
    `ExtendedQueryBase`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `DelegatingCollector` | `getFilterCollector(IndexSearcher searcher)` Returns a DelegatingCollector to be run after the main query and all of its filters, but before any sorting or grouping collectors

    - ### Methods inherited from interface org.apache.solr.search.ExtendedQuery

      `getCache, getCacheSep, getCost, setCache, setCacheSep, setCost`

- - ### Method Detail

    - #### getFilterCollector

          DelegatingCollector getFilterCollector(IndexSearcher searcher)

      Returns a DelegatingCollector to be run after the main query and all of its filters, but before any sorting or grouping collectors

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