Class AbstractExtendedSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,R extends SearchResult<H>,SC extends SearchScroll<H>,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C>
- java.lang.Object
-
- org.hibernate.search.engine.search.query.dsl.spi.AbstractSearchQueryOptionsStep<S,H,LOS,PDF,SF,AF,C>
-
- org.hibernate.search.engine.search.query.dsl.spi.AbstractExtendedSearchQueryOptionsStep<S,H,R,SC,LOS,PDF,SF,AF,C>
-
- All Implemented Interfaces:
SearchQueryFinalStep<H>,SearchQueryOptionsStep<S,H,LOS,SF,AF>,SearchQueryWhereStep<S,H,LOS,PDF>,SearchFetchable<H>
public abstract class AbstractExtendedSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,R extends SearchResult<H>,SC extends SearchScroll<H>,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C> extends AbstractSearchQueryOptionsStep<S,H,LOS,PDF,SF,AF,C>
-
-
Constructor Summary
Constructors Constructor Description AbstractExtendedSearchQueryOptionsStep(IndexScope<C> indexScope, SearchQueryBuilder<H,C> searchQueryBuilder, LoadingContextBuilder<?,?,LOS> loadingContextBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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.abstract ExtendedSearchQuery<H,R,SC>toQuery()Create aSearchQueryinstance matching the definition given in the previous DSL steps.-
Methods inherited from class org.hibernate.search.engine.search.query.dsl.spi.AbstractSearchQueryOptionsStep
aggregation, aggregation, extendAggregationFactory, extendPredicateFactory, extendSortFactory, failAfter, fetchAllHits, fetchHits, fetchHits, fetchSingleHit, fetchTotalHitCount, loading, routing, routing, sort, sort, thisAsS, totalHitCountThreshold, truncateAfter, where, where
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.search.query.dsl.SearchQueryWhereStep
predicate, predicate
-
-
-
-
Constructor Detail
-
AbstractExtendedSearchQueryOptionsStep
public AbstractExtendedSearchQueryOptionsStep(IndexScope<C> indexScope, SearchQueryBuilder<H,C> searchQueryBuilder, LoadingContextBuilder<?,?,LOS> loadingContextBuilder)
-
-
Method Detail
-
toQuery
public abstract ExtendedSearchQuery<H,R,SC> toQuery()
Description copied from interface:SearchQueryFinalStepCreate aSearchQueryinstance matching the definition given in the previous DSL steps.Calling this method is generally not necessary as most query execution methods are also implemented by this DSL step, so for example
.toQuery().fetch()can be replaced with simply.fetch().- Specified by:
toQueryin interfaceSearchQueryFinalStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>>- Overrides:
toQueryin classAbstractSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C>- Returns:
- The
SearchQueryresulting from the previous DSL steps.
-
fetchAll
public 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<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>>- Overrides:
fetchAllin classAbstractSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C>- Returns:
- The
SearchResult.
-
fetch
public R fetch(Integer limit)
Description copied from interface:SearchFetchableExecute the query and return theSearchResult, limiting tolimithits.- Specified by:
fetchin interfaceSearchFetchable<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>>- Overrides:
fetchin classAbstractSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C>- Parameters:
limit- The maximum number of hits to be included in theSearchResult.nullmeans no limit.- Returns:
- The
SearchResult.
-
fetch
public R fetch(Integer offset, Integer limit)
Description copied from interface:SearchFetchable- Specified by:
fetchin interfaceSearchFetchable<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>>- Overrides:
fetchin classAbstractSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C>- 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.
-
scroll
public 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<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>>- Overrides:
scrollin classAbstractSearchQueryOptionsStep<S extends SearchQueryOptionsStep<S,H,LOS,SF,AF>,H,LOS,PDF extends SearchPredicateFactory,SF extends SearchSortFactory,AF extends SearchAggregationFactory,C>- Parameters:
chunkSize- The maximum number of hits to be returned for each call toSearchScroll.next()- Returns:
- The
SearchScroll.
-
-