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 classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<SearchClient.Capability> protected final SearchScrollContextprotected static final Stringprotected final longprotected 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.longReturns the number of returned search hits, taking in account limits.Returns the list ofSearchClient.Capabilitythat are missing to fully perform the SearchQuery.Returns a scroll context to use inSearchService.searchScroll(SearchScrollContext)to fetch the next batch of results.longgetTotal()Get the total number of match for the query.booleanReturnstrueif 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 DocumentModelListloadDocumentsOneByOne(CoreSession session, List<String> documentIds) protected DocumentModelListloadDocumentsUsingSession(CoreSession session) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:SearchResponseReturns the list ofSearchClient.Capabilitythat are missing to fully perform the SearchQuery.- Specified by:
getMissingCapabilitiesin interfaceSearchResponse
-
getHits
Description copied from interface:SearchResponseReturns the search hits.- Specified by:
getHitsin interfaceSearchResponse
-
getHitsCount
public long getHitsCount()Description copied from interface:SearchResponseReturns the number of returned search hits, taking in account limits.- Specified by:
getHitsCountin interfaceSearchResponse
-
getHitsAsMap
Description copied from interface:SearchResponseReturns search hits as a partial list.- Specified by:
getHitsAsMapin interfaceSearchResponse
-
getHitsAsIterator
Description copied from interface:SearchResponseReturns search hits as an iterator, the query must be a scroll query.- Specified by:
getHitsAsIteratorin interfaceSearchResponse
-
getTotal
public long getTotal()Description copied from interface:SearchResponseGet the total number of match for the query. Limit is not taken in account.- Specified by:
getTotalin interfaceSearchResponse- Returns:
-1if unknown.
-
isTotalAccurate
public boolean isTotalAccurate()Description copied from interface:SearchResponseReturnstrueif the total is accurate, i.e. not an estimation.- Specified by:
isTotalAccuratein interfaceSearchResponse
-
getScrollContext
Description copied from interface:SearchResponseReturns a scroll context to use inSearchService.searchScroll(SearchScrollContext)to fetch the next batch of results.- Specified by:
getScrollContextin interfaceSearchResponse
-
getAggregates
Description copied from interface:SearchResponseReturns the aggregates.- Specified by:
getAggregatesin interfaceSearchResponse
-
loadDocuments
Description copied from interface:SearchResponseLoads 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:
loadDocumentsin interfaceSearchResponse
-
loadDocumentsUsingSession
-
loadDocumentsOneByOne
-
toString
-