Interface ElasticsearchSearchQuerySelectStep<SR,R,E,LOS>
- All Superinterfaces:
ElasticsearchSearchQueryWhereStep<SR,
,E, LOS> SearchQuerySelectStep<SR,
,ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> SearchQueryWhereStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, E, LOS, ElasticsearchSearchPredicateFactory<SR>>
public interface ElasticsearchSearchQuerySelectStep<SR,R,E,LOS>
extends SearchQuerySelectStep<SR,ElasticsearchSearchQueryOptionsStep<SR,E,LOS>,R,E,LOS,ElasticsearchSearchProjectionFactory<SR,R,E>,ElasticsearchSearchPredicateFactory<SR>>, ElasticsearchSearchQueryWhereStep<SR,E,LOS>
-
Method Summary
Modifier and TypeMethodDescriptionSelect an object projection as a representation of the search hit for each matching document.select
(Function<? super ElasticsearchSearchProjectionFactory<SR, R, E>, ? extends ProjectionFinalStep<P>> projectionContributor) Select a given projection as a representation of the search hit for each matching document.select
(SearchProjection<?>... projections) Select a list of projections as a representation of the search hit for each matching document.select
(SearchProjection<P> projection) Select a projection as a representation of the search hit for each matching document.Select the entity was originally indexed as a representation of the search hit for each matching document.Select a reference to the entity that was originally indexed as a representation of the search hit for each matching document.Methods inherited from interface org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep
extension
Methods inherited from interface org.hibernate.search.engine.search.query.dsl.SearchQueryWhereStep
where, where, where
-
Method Details
-
selectEntity
ElasticsearchSearchQueryWhereStep<SR,E, selectEntity()LOS> Description copied from interface:SearchQuerySelectStep
Select the entity was originally indexed as a representation of the search hit for each matching document.The entity will be loaded directly from its original source (relational database, ...).
- Specified by:
selectEntity
in interfaceSearchQuerySelectStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> - Returns:
- The next step.
- See Also:
-
selectEntityReference
ElasticsearchSearchQueryWhereStep<SR,R, selectEntityReference()LOS> Description copied from interface:SearchQuerySelectStep
Select a reference to the entity that was originally indexed as a representation of the search hit for each matching document.Entity references are instances of type
EntityReference
, but some mappers may expose a different type for backwards compatibility reasons.EntityReference
should be favored wherever possible as mapper-specific types will eventually be removed.- Specified by:
selectEntityReference
in interfaceSearchQuerySelectStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> - Returns:
- The next step.
- See Also:
-
select
Description copied from interface:SearchQuerySelectStep
Select an object projection as a representation of the search hit for each matching document.- Specified by:
select
in interfaceSearchQuerySelectStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> - Type Parameters:
P
- The resulting type of the projection.- Parameters:
objectClass
- The type of objects returned by the projection. The class is expected to be mapped (generally through annotations) in such a way that it defines the inner projections.- Returns:
- The next step.
- See Also:
-
select
<P> ElasticsearchSearchQueryWhereStep<SR,P, selectLOS> (Function<? super ElasticsearchSearchProjectionFactory<SR, R, E>, ? extends ProjectionFinalStep<P>> projectionContributor) Description copied from interface:SearchQuerySelectStep
Select a given projection as a representation of the search hit for each matching document.- Specified by:
select
in interfaceSearchQuerySelectStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> - Type Parameters:
P
- The resulting type of the projection.- Parameters:
projectionContributor
- A function that will use the factory passed in parameter to create a projection, returning the final step in the projection DSL. Should generally be a lambda expression.- Returns:
- The next step.
- See Also:
-
select
Description copied from interface:SearchQuerySelectStep
Select a projection as a representation of the search hit for each matching document.- Specified by:
select
in interfaceSearchQuerySelectStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> - Type Parameters:
P
- The resulting type of the projection.- Parameters:
projection
- A previously-createdSearchProjection
object.- Returns:
- The next step.
- See Also:
-
select
Description copied from interface:SearchQuerySelectStep
Select a list of projections as a representation of the search hit for each matching document.Note that using this method will force you to use casts when consuming the results, since the returned lists are not typed (
List<?>
instead ofList<T>
). You can replace calls to this method advantageously with calls toSearchQuerySelectStep.select(Function)
defining acomposite projection
.- Specified by:
select
in interfaceSearchQuerySelectStep<SR,
ElasticsearchSearchQueryOptionsStep<SR, E, LOS>, R, E, LOS, ElasticsearchSearchProjectionFactory<SR, R, E>, ElasticsearchSearchPredicateFactory<SR>> - Parameters:
projections
- A list of previously-createdSearchProjection
objects.- Returns:
- The next step.
- See Also:
-