|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.search.v2.lucene.resultfilter.LuceneHandleBasedSubsetResultFilter
public class LuceneHandleBasedSubsetResultFilter
Filter that allows clients to ask for a page of results that begins at a particular result (identified using a Handle).
For performance reasons, this filter can only return a subset within the bounds of MAX_HITS_TO_SEARCH. That is,
if you request a handle ranked just 5 pages before the limit and a page size of 10, you will only get 5 results. Similarly,
requesting a handle that is ranked beyond the limit will return an empty subset.
WARNING: Do not reuse this filter outside of the search it was originally created for.
| Field Summary | |
|---|---|
static int |
MAX_HITS_TO_SEARCH
Sets a maximum to the number of hits this filter will iterate over to find the handle. |
| Constructor Summary | |
|---|---|
LuceneHandleBasedSubsetResultFilter(com.atlassian.bonnie.Handle startHandle,
int pageSize)
|
|
| Method Summary | |
|---|---|
int |
getExpectedResultsCount()
The number of results that the filter expects to allow into the final search result. |
void |
init(org.apache.lucene.index.IndexReader indexReader)
Performs initialisation of a result filter using the indexReader provided. |
boolean |
isIncludedInResults(WrappedHit hit)
|
boolean |
isInitialized()
|
boolean |
shouldContinueIterating()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_HITS_TO_SEARCH
We want to limit this to 200, because our use of the Hits object makes it expensive
to ask for a large body of results. For example, requesting 200 results costs 2 searches and 400 results costs 3 searches.
We currently consider 2 searches an acceptable cost to allow clients access to more results (up to 200 anyway).
| Constructor Detail |
|---|
public LuceneHandleBasedSubsetResultFilter(com.atlassian.bonnie.Handle startHandle,
int pageSize)
| Method Detail |
|---|
public void init(org.apache.lucene.index.IndexReader indexReader)
InitializationRequired
init in interface InitializationRequiredindexReader - the indexReader owned by the IndexSearcher used by the search.public boolean isInitialized()
isInitialized in interface InitializationRequiredpublic boolean isIncludedInResults(WrappedHit hit)
isIncludedInResults in interface LuceneResultFilterpublic boolean shouldContinueIterating()
shouldContinueIterating in interface LuceneResultFilterpublic int getExpectedResultsCount()
LuceneResultFilter
getExpectedResultsCount in interface LuceneResultFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||