R
- The type of references, i.e. the type of objects returned for reference projections
.O
- The type of loaded objects, i.e. the type of objects returned for
object projections
.public interface SearchProjectionFactoryContext<R,O>
Modifier and Type | Method and Description |
---|---|
<P1,P2,T> CompositeProjectionContext<T> |
composite(BiFunction<P1,P2,T> transformer,
SearchProjection<P1> projection1,
SearchProjection<P2> projection2)
Creates a composite projection i.e.
|
<T> CompositeProjectionContext<T> |
composite(Function<List<?>,T> transformer,
SearchProjection<?>... projections)
Creates a composite projection i.e.
|
<P,T> CompositeProjectionContext<T> |
composite(Function<P,T> transformer,
SearchProjection<P> projection)
Creates a composite projection i.e.
|
default CompositeProjectionContext<List<?>> |
composite(SearchProjection<?>... projections) |
<P1,P2,P3,T> |
composite(TriFunction<P1,P2,P3,T> transformer,
SearchProjection<P1> projection1,
SearchProjection<P2> projection2,
SearchProjection<P3> projection3)
Creates a composite projection i.e.
|
DistanceToFieldProjectionContext |
distance(String absoluteFieldPath,
GeoPoint center)
Project on the distance from the center to a
GeoPoint field. |
DocumentReferenceProjectionContext |
documentReference()
Project the match to a
DocumentReference . |
FieldProjectionContext<Object> |
field(String absoluteFieldPath)
Project to a field of the indexed document without specifying a type.
|
<T> FieldProjectionContext<T> |
field(String absoluteFieldPath,
Class<T> type)
Project to a field of the indexed document.
|
ObjectProjectionContext<O> |
object()
Project to an object representing the match.
|
ReferenceProjectionContext<R> |
reference()
Project to a reference to the match.
|
ScoreProjectionContext |
score()
Project on the score of the hit.
|
DocumentReferenceProjectionContext documentReference()
DocumentReference
.ReferenceProjectionContext<R> reference()
The actual type of the reference depends on the mapper used to create the query: a POJO mapper may return a class/identifier couple, for example.
ObjectProjectionContext<O> object()
The actual type of the object depends on the entry point
for your query: an IndexManager
will return a Java representation of the document,
but a mapper may return a Java representation of the mapped object.
<T> FieldProjectionContext<T> field(String absoluteFieldPath, Class<T> type)
T
- The resulting type of the projection.absoluteFieldPath
- The absolute path of the field.type
- The resulting type of the projection.FieldProjectionContext<Object> field(String absoluteFieldPath)
absoluteFieldPath
- The absolute path of the field.ScoreProjectionContext score()
DistanceToFieldProjectionContext distance(String absoluteFieldPath, GeoPoint center)
GeoPoint
field.default CompositeProjectionContext<List<?>> composite(SearchProjection<?>... projections)
<T> CompositeProjectionContext<T> composite(Function<List<?>,T> transformer, SearchProjection<?>... projections)
<P,T> CompositeProjectionContext<T> composite(Function<P,T> transformer, SearchProjection<P> projection)
<P1,P2,T> CompositeProjectionContext<T> composite(BiFunction<P1,P2,T> transformer, SearchProjection<P1> projection1, SearchProjection<P2> projection2)
<P1,P2,P3,T> CompositeProjectionContext<T> composite(TriFunction<P1,P2,P3,T> transformer, SearchProjection<P1> projection1, SearchProjection<P2> projection2, SearchProjection<P3> projection3)
Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.