public interface SearchQueryResultDefinitionContext
org.hibernate.search.engine.search.dsl.query.SearchQueryResultContext<SearchQuery<PojoReference>> asReference()
PojoReference for each matching document.SearchQueryResultContext<T> org.hibernate.search.engine.search.dsl.query.SearchQueryResultContext<SearchQuery<T>> asProjection(Function<? super org.hibernate.search.engine.search.dsl.projection.SearchProjectionFactoryContext<PojoReference,?>,? extends org.hibernate.search.engine.search.dsl.projection.SearchProjectionTerminalContext<T>> projectionContributor)
T - The resulting type of the projection.projectionContributor - A function that will use the DSL context passed in parameter to create a projection,
returning the resulting terminal context.
Should generally be a lambda expression.SearchQueryResultContext<T> org.hibernate.search.engine.search.dsl.query.SearchQueryResultContext<SearchQuery<T>> asProjection(org.hibernate.search.engine.search.SearchProjection<T> projection)
T - The resulting type of the projection.projection - A SearchProjection object obtained from the SearchScope.SearchQueryResultContextorg.hibernate.search.engine.search.dsl.query.SearchQueryResultContext<SearchQuery<List<?>>> asProjections(org.hibernate.search.engine.search.SearchProjection<?>... projections)
Note that using this method will force you to use casts when consuming the results,
since the returned lists are not typed (List<?> instead of List<T>).
You can replace calls to this method advantageously with calls to asProjection(Function)
defining a composite projection.
projections - A list of SearchProjection object obtained from the SearchScope.SearchProjectionFactoryContext.composite(BiFunction, SearchProjection, SearchProjection),
SearchQueryResultContextCopyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.