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:
ElasticsearchSearchFetchable<H>
,ElasticsearchSearchQuery<H>
,ElasticsearchSearchQueryOptionsStep<H,
,LOS> ExtendedSearchQuery<H,
,R, SC> LuceneSearchFetchable<H>
,LuceneSearchQuery<H>
,LuceneSearchQueryOptionsStep<H,
LOS>
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 tolimit
hits.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:SearchFetchable
Execute the query and return theSearchResult
, limiting tolimit
hits.- Specified by:
fetch
in interfaceSearchFetchable<H>
- Parameters:
limit
- The maximum number of hits to be included in theSearchResult
.null
means no limit.- Returns:
- The
SearchResult
.
-
fetch
Description copied from interface:SearchFetchable
- Specified by:
fetch
in interfaceSearchFetchable<H>
- Parameters:
offset
- The number of hits to skip before adding the hits to theSearchResult
.null
means no offset.limit
- The maximum number of hits to be included in theSearchResult
.null
means no limit.- Returns:
- The
SearchResult
.
-
fetchAll
R fetchAll()Description copied from interface:SearchFetchable
Execute 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:
fetchAll
in interfaceSearchFetchable<H>
- Returns:
- The
SearchResult
.
-
scroll
Description copied from interface:SearchFetchable
Execute the query continuously to deliver results in small chunks through aSearchScroll
.Useful to process large datasets.
- Specified by:
scroll
in interfaceSearchFetchable<H>
- Parameters:
chunkSize
- The maximum number of hits to be returned for each call toSearchScroll.next()
- Returns:
- The
SearchScroll
.
-