Interface ISearch.Builder<SEARCH extends ISearch>
- Type Parameters:
SEARCH
- the type of search object that this builder creates
- All Known Implementing Classes:
AbstractSearch.AbstractBuilder
,ChangesSearch.Builder
,ContentSearch.Builder
,DecoratorSearchBuilder
,DefaultSearch.Builder
- Enclosing interface:
- ISearch
public static interface ISearch.Builder<SEARCH extends ISearch>
Builder interface to create new search instance with the specified values
- Since:
- 9.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
generatesToken
(boolean generatesToken) Specifies whether the resultingSearchResults.getNextPageSearch()
will be generated with a token.default ISearch.Builder<SEARCH>
Specifies the targeted indexesSpecifies 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).
-
Method Details
-
indices
Specifies the targeted indexes- Parameters:
indices
-- Returns:
- the current builder
-
indices
Specifies the targeted indexes- Parameters:
indices
-- Returns:
- the current builder
-
query
-
sort
Specifies the sort component of the search- Parameters:
sort
-- Returns:
- the current builder
-
startOffset
Specifies the start offset (0 based).- Parameters:
startOffset
-- Returns:
- the current builder
-
limit
Specifies the maximum page size (positive).- Parameters:
limit
-- Returns:
- the current builder
-
generatesToken
Specifies 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.
- Parameters:
generatesToken
-- Returns:
- the current builder
- See Also:
-
build
SEARCH build()- Returns:
- a new instance of
ISearch.Builder
-