org.apache.lucene.search
Class FilteringTopFieldDocCollector

java.lang.Object
  extended by org.apache.lucene.search.HitCollector
      extended by org.apache.lucene.search.TopDocCollector
          extended by org.apache.lucene.search.TopFieldDocCollector
              extended by org.apache.lucene.search.FilteringTopFieldDocCollector

public class FilteringTopFieldDocCollector
extends org.apache.lucene.search.TopFieldDocCollector

An variant of TopFieldDocCollector that provides permission based filtering. The permissions are checked lazily - only for the objects that fulfill all other search criteria (including "being in the top 10 best search hits").


Constructor Summary
FilteringTopFieldDocCollector(LucenePermissionChecker permissionChecker, org.apache.lucene.index.IndexReader reader, org.apache.lucene.search.Sort sort, int numHits)
          Construct to collect a given number of hits.
 
Method Summary
 
Methods inherited from class org.apache.lucene.search.TopFieldDocCollector
collect, topDocs
 
Methods inherited from class org.apache.lucene.search.TopDocCollector
getTotalHits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteringTopFieldDocCollector

public FilteringTopFieldDocCollector(@NotNull
                                     LucenePermissionChecker permissionChecker,
                                     org.apache.lucene.index.IndexReader reader,
                                     @NotNull
                                     org.apache.lucene.search.Sort sort,
                                     int numHits)
                              throws java.io.IOException
Construct to collect a given number of hits.

Parameters:
indexReader -
sort - the sort criteria
numHits - the maximum number of hits to collect
Throws:
java.io.IOException


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.