public class

SubsetResultFilter

extends Object
implements ResultFilter
java.lang.Object
   ↳ com.atlassian.confluence.search.v2.filter.SubsetResultFilter

Class Overview

A result filter that filters out all but a particular "window" (startOffset from start, count) of results. Depending on the number of results in the hit set being filtered, there may be fewer than count results returned, or even none at all.

Can also be used, with a startOffset of 0, to return the first 'n' results

Summary

Constants
String KEY
Public Constructors
SubsetResultFilter(int maxResults)
Construct a filter that returns at most the first count hits.
SubsetResultFilter(int startOffset, int maxResults)
Construct a filter with the given start offset and count.
Public Methods
boolean equals(Object o)
String getKey()
Gets the unique key that identifies this type of result filter.
int getMaxResults()
Gets the maximum number of results the filter should allow through
List getParameters()
Gets the parameters that configure this result filter.
int getStartOffset()
Gets the offset of the first search result to return
int hashCode()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.search.v2.ResultFilter

Constants

public static final String KEY

Constant Value: "subset"

Public Constructors

public SubsetResultFilter (int maxResults)

Construct a filter that returns at most the first count hits. This is the equivalent of new SubsetResultFilter(0, maxResults).

Parameters
maxResults the number of hits to return

public SubsetResultFilter (int startOffset, int maxResults)

Construct a filter with the given start offset and count. Offsets are zero-based, so an offset of 0 means "start at the first hit".

Parameters
startOffset the zero-based offset of the first hit to return
maxResults the maximum number of hits to return

Public Methods

public boolean equals (Object o)

public String getKey ()

Gets the unique key that identifies this type of result filter.

Returns
  • the filter key
See Also

public int getMaxResults ()

Gets the maximum number of results the filter should allow through

Returns
  • the maximum number of results to allow

public List getParameters ()

Gets the parameters that configure this result filter. Parameters should either be strings, or ResultFilter implementations.

Returns
  • the filter parameters
See Also

public int getStartOffset ()

Gets the offset of the first search result to return

Returns
  • the start offset for results

public int hashCode ()