Interface ExtendedSearchFetchable<H,R extends SearchResult<H>,SC extends SearchScroll<H>>
-
- Type Parameters:
H- The type of query hits.R- The result type (extendingSearchResult).SC- The scroll type (extendingSearchScroll).
- All Superinterfaces:
SearchFetchable<H>
- All Known Subinterfaces:
ExtendedSearchQuery<H,R,SC>
public interface ExtendedSearchFetchable<H,R extends SearchResult<H>,SC extends SearchScroll<H>> extends SearchFetchable<H>
A base interface for subtypes ofSearchFetchableallowing to easily override the result type for all relevant methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rfetch(Integer limit)Execute the query and return theSearchResult, limiting tolimithits.Rfetch(Integer offset, Integer limit)RfetchAll()Execute the query and return theSearchResult, including all hits, without any sort of limit.SCscroll(int chunkSize)Execute the query continuously to deliver results in small chunks through aSearchScroll.-
Methods inherited from interface org.hibernate.search.engine.search.query.SearchFetchable
fetchAllHits, fetchHits, fetchHits, fetchSingleHit, fetchTotalHitCount
-
-
-
-
Method Detail
-
fetch
R fetch(Integer limit)
Description copied from interface:SearchFetchableExecute the query and return theSearchResult, limiting tolimithits.- Specified by:
fetchin interfaceSearchFetchable<H>- Parameters:
limit- The maximum number of hits to be included in theSearchResult.nullmeans no limit.- Returns:
- The
SearchResult.
-
fetch
R fetch(Integer offset, Integer limit)
Description copied from interface:SearchFetchable- Specified by:
fetchin interfaceSearchFetchable<H>- Parameters:
offset- The number of hits to skip before adding the hits to theSearchResult.nullmeans no offset.limit- The maximum number of hits to be included in theSearchResult.nullmeans no limit.- Returns:
- The
SearchResult.
-
fetchAll
R fetchAll()
Description copied from interface:SearchFetchableExecute the query and return theSearchResult, including all hits, without any sort of limit.SearchFetchable.fetch(Integer)orSearchFetchable.fetch(Integer, Integer)should generally be preferred, for performance reasons.- Specified by:
fetchAllin interfaceSearchFetchable<H>- Returns:
- The
SearchResult.
-
scroll
SC scroll(int chunkSize)
Description copied from interface:SearchFetchableExecute the query continuously to deliver results in small chunks through aSearchScroll.Useful to process large datasets.
- Specified by:
scrollin interfaceSearchFetchable<H>- Parameters:
chunkSize- The maximum number of hits to be returned for each call toSearchScroll.next()- Returns:
- The
SearchScroll.
-
-