Class DecoratorSearchBuilder<SEARCH extends ISearch>
java.lang.Object
com.atlassian.confluence.search.v2.DecoratorSearchBuilder<SEARCH>
- Type Parameters:
SEARCH- theISearchdecorator class that this builder builds
- All Implemented Interfaces:
ISearch.Builder<SEARCH>
public class DecoratorSearchBuilder<SEARCH extends ISearch>
extends Object
implements ISearch.Builder<SEARCH>
A builder for a search object that decorates another search object.
- Since:
- 9.0
-
Constructor Summary
ConstructorsConstructorDescriptionDecoratorSearchBuilder(ISearch.Builder<?> delegate, Function<ISearch, SEARCH> mapper) -
Method Summary
Modifier and TypeMethodDescriptionbuild()generatesToken(boolean generatesToken) Specifies whether the resultingSearchResults.getNextPageSearch()will be generated with a token.Specifies the targeted indexeslimit(int limit) Specifies the maximum page size (positive).query(SearchQuery query) sort(SearchSort sort) Specifies the sort component of the searchstartOffset(int startOffset) Specifies the start offset (0 based).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.search.v2.ISearch.Builder
indices
-
Constructor Details
-
DecoratorSearchBuilder
-
-
Method Details
-
indices
Description copied from interface:ISearch.BuilderSpecifies the targeted indexes- Specified by:
indicesin interfaceISearch.Builder<SEARCH extends ISearch>- Parameters:
indices-- Returns:
- the current builder
-
query
- Specified by:
queryin interfaceISearch.Builder<SEARCH extends ISearch>
-
sort
Description copied from interface:ISearch.BuilderSpecifies the sort component of the search- Specified by:
sortin interfaceISearch.Builder<SEARCH extends ISearch>- Parameters:
sort-- Returns:
- the current builder
-
startOffset
Description copied from interface:ISearch.BuilderSpecifies the start offset (0 based).- Specified by:
startOffsetin interfaceISearch.Builder<SEARCH extends ISearch>- Parameters:
startOffset-- Returns:
- the current builder
-
limit
Description copied from interface:ISearch.BuilderSpecifies the maximum page size (positive).- Specified by:
limitin interfaceISearch.Builder<SEARCH extends ISearch>- Parameters:
limit-- Returns:
- the current builder
-
generatesToken
Description copied from interface:ISearch.BuilderSpecifies whether the resultingSearchResults.getNextPageSearch()will be generated with a token. A search token allows additional searching to be performed against a specific version of the index.Note: for backward compatibility reason, this value only applies to OpenSearch, since it's costly to always generate a token for every search request. On Lucene, this value is currently ignored, i.e. it will continue to generate a token for every search request. This may change in the future, so if you require a token, make sure to set this to true.
- Specified by:
generatesTokenin interfaceISearch.Builder<SEARCH extends ISearch>- Parameters:
generatesToken-- Returns:
- the current builder
- See Also:
-
build
- Specified by:
buildin interfaceISearch.Builder<SEARCH extends ISearch>- Returns:
- a new instance of
ISearch.Builder
-