Package org.nuxeo.ecm.core.search
Class SearchQueryImpl.Builder
java.lang.Object
org.nuxeo.ecm.core.search.SearchQueryImpl.Builder
- Enclosing class:
SearchQueryImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final Duration
protected int
protected final String
protected int
protected final NuxeoPrincipal
protected Duration
protected boolean
protected int
protected final List
<SearchIndex> protected static final String
protected static final String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Builder
(List<SearchIndex> searchIndexes, String nxql, NuxeoPrincipal principal) Creates a SearchQuery builder. -
Method Summary
Modifier and TypeMethodDescriptionaddAggregate
(Aggregate<? extends Bucket> aggregate) Asks for an aggregate.addAggregates
(List<Aggregate<? extends Bucket>> aggregates) Asks for a list of aggregates.addHighlight
(String highlight) Asks to extract highlights for the following fields if the client supports highlight.addHighlights
(List<String> highlights) Asks to extract highlights for the following fields if the client supports highlight.Adds an ordering clause.Adds ordering clauses.build()
Creates the SearchQuery.protected static String
limit
(int limit) No more than that many documents will be returned.offset
(int offset) Says to skip that many documents before beginning to return documents.scrollKeepAlive
(Duration value) Sets the scroll context keep alive duration, this is the maximum duration between calls of searchScroll API, which is the time to process a SearchResponse.scrollSearch
(boolean value) A scroll search is for deep pagination, returning large amount of results, useSearchService.searchScroll(SearchScrollContext)
to iterate.scrollSize
(int scrollSize) Sets the maximum number of hits to return when using the scroll API.
-
Field Details
-
SELECT_ALL
- See Also:
-
SELECT_ALL_WHERE
- See Also:
-
DEFAULT_SCROLL_TIMEOUT_DURATION
-
DEFAULT_SCROLL_SIZE
protected static final int DEFAULT_SCROLL_SIZE- See Also:
-
DEFAULT_LIMIT
protected static final int DEFAULT_LIMIT- See Also:
-
sortInfos
-
highlights
-
aggregates
-
searchIndexes
-
nxql
-
principal
-
offset
protected int offset -
limit
protected int limit -
scrollSearch
protected boolean scrollSearch -
scrollKeepAlive
-
scrollSize
protected int scrollSize
-
-
Constructor Details
-
Builder
Creates a SearchQuery builder.
-
-
Method Details
-
completeQueryWithSelect
-
offset
Says to skip that many documents before beginning to return documents. If both offset and limit appear, then offset documents are skipped before starting to count the limit documents that are returned. This has no effect on scroll search. -
limit
No more than that many documents will be returned. This has no effect on scroll search. -
scrollSearch
A scroll search is for deep pagination, returning large amount of results, useSearchService.searchScroll(SearchScrollContext)
to iterate. -
scrollKeepAlive
Sets the scroll context keep alive duration, this is the maximum duration between calls of searchScroll API, which is the time to process a SearchResponse. -
scrollSize
Sets the maximum number of hits to return when using the scroll API. -
addSort
Adds an ordering clause. -
addSorts
Adds ordering clauses. -
addHighlight
Asks to extract highlights for the following fields if the client supports highlight. -
addHighlights
Asks to extract highlights for the following fields if the client supports highlight. -
addAggregate
Asks for an aggregate. -
addAggregates
Asks for a list of aggregates. -
build
Creates the SearchQuery.
-