Package org.nuxeo.ecm.core.search
Class SearchResponseImpl
java.lang.Object
org.nuxeo.ecm.core.search.SearchResponseImpl
- All Implemented Interfaces:
SearchResponse
- Since:
- 2025.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List
<SearchClient.Capability> protected final SearchScrollContext
protected static final String
protected final long
protected final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the aggregates.getHits()
Returns the search hits.Returns search hits as an iterator, the query must be a scroll query.Returns search hits as a partial list.long
Returns the number of returned search hits, taking in account limits.Returns the list ofSearchClient.Capability
that are missing to fully perform the SearchQuery.Returns a scroll context to use inSearchService.searchScroll(SearchScrollContext)
to fetch the next batch of results.long
getTotal()
Get the total number of match for the query.boolean
Returnstrue
if the total is accurate, i.e. not an estimation.loadDocuments
(CoreSession defaultSession) Loads search hits from repository as a DocumentModelList using the provided session.protected DocumentModelList
loadDocumentsOneByOne
(CoreSession session, List<String> documentIds) protected DocumentModelList
loadDocumentsUsingSession
(CoreSession session) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.core.search.SearchResponse
isMissingCapabilities
-
Field Details
-
SELECT_DOCUMENTS_IN
- See Also:
-
hits
-
missingCapabilities
-
total
protected final long total -
totalAccurate
protected final boolean totalAccurate -
scrollContext
-
aggregates
-
-
Constructor Details
-
SearchResponseImpl
-
-
Method Details
-
getMissingCapabilities
Description copied from interface:SearchResponse
Returns the list ofSearchClient.Capability
that are missing to fully perform the SearchQuery.- Specified by:
getMissingCapabilities
in interfaceSearchResponse
-
getHits
Description copied from interface:SearchResponse
Returns the search hits.- Specified by:
getHits
in interfaceSearchResponse
-
getHitsCount
public long getHitsCount()Description copied from interface:SearchResponse
Returns the number of returned search hits, taking in account limits.- Specified by:
getHitsCount
in interfaceSearchResponse
-
getHitsAsMap
Description copied from interface:SearchResponse
Returns search hits as a partial list.- Specified by:
getHitsAsMap
in interfaceSearchResponse
-
getHitsAsIterator
Description copied from interface:SearchResponse
Returns search hits as an iterator, the query must be a scroll query.- Specified by:
getHitsAsIterator
in interfaceSearchResponse
-
getTotal
public long getTotal()Description copied from interface:SearchResponse
Get the total number of match for the query. Limit is not taken in account.- Specified by:
getTotal
in interfaceSearchResponse
- Returns:
-1
if unknown.
-
isTotalAccurate
public boolean isTotalAccurate()Description copied from interface:SearchResponse
Returnstrue
if the total is accurate, i.e. not an estimation.- Specified by:
isTotalAccurate
in interfaceSearchResponse
-
getScrollContext
Description copied from interface:SearchResponse
Returns a scroll context to use inSearchService.searchScroll(SearchScrollContext)
to fetch the next batch of results.- Specified by:
getScrollContext
in interfaceSearchResponse
-
getAggregates
Description copied from interface:SearchResponse
Returns the aggregates.- Specified by:
getAggregates
in interfaceSearchResponse
-
loadDocuments
Description copied from interface:SearchResponse
Loads search hits from repository as a DocumentModelList using the provided session. Can be an expensive operation. In the case of a multi repository search, additional sessions are created using the defaultSession principal.- Specified by:
loadDocuments
in interfaceSearchResponse
-
loadDocumentsUsingSession
-
loadDocumentsOneByOne
-
toString
-