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 of
SearchFetchable allowing to
easily override the result type for all relevant methods.-
Method Summary
Modifier and TypeMethodDescriptionExecute the query and return theSearchResult, limiting tolimithits.fetchAll()Execute the query and return theSearchResult, including all hits, without any sort of limit.scroll(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 Details
-
fetch
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
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
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.
-