Interface ElasticsearchSearchProjectionFactory<R,E>
- Type Parameters:
R- The type of entity references.E- The type of entities.
- All Superinterfaces:
ExtendedSearchProjectionFactory<ElasticsearchSearchProjectionFactory<R,,E>, R, E> SearchProjectionFactory<R,E>
public interface ElasticsearchSearchProjectionFactory<R,E>
extends ExtendedSearchProjectionFactory<ElasticsearchSearchProjectionFactory<R,E>,R,E>
A factory for search projections with some Elasticsearch-specific methods.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionProjectionFinalStep<com.google.gson.JsonObject>Project to aJsonObjectdescribing the score computation for the hit.ProjectionFinalStep<com.google.gson.JsonObject>jsonHit()Project to aJsonObjectrepresenting the hit as returned by Elasticsearch.ProjectionFinalStep<com.google.gson.JsonObject>source()Project to aJsonObjectrepresenting the document as stored in Elasticsearch.Methods inherited from interface org.hibernate.search.engine.search.projection.dsl.ExtendedSearchProjectionFactory
withRootMethods inherited from interface org.hibernate.search.engine.search.projection.dsl.SearchProjectionFactory
composite, composite, composite, composite, composite, composite, composite, composite, composite, composite, composite, constant, distance, documentReference, entity, entityReference, extension, extension, field, field, field, field, id, id, object, score, toAbsolutePath
-
Method Details
-
source
ProjectionFinalStep<com.google.gson.JsonObject> source()Project to aJsonObjectrepresenting the document as stored in Elasticsearch.- Returns:
- The final step of the projection DSL.
-
explanation
ProjectionFinalStep<com.google.gson.JsonObject> explanation()Project to aJsonObjectdescribing the score computation for the hit.This feature is relatively expensive, do not use unless you return a limited amount of hits (using pagination).
- Returns:
- The final step of the projection DSL.
-
jsonHit
ProjectionFinalStep<com.google.gson.JsonObject> jsonHit()Project to aJsonObjectrepresenting the hit as returned by Elasticsearch.- Returns:
- The final step of the projection DSL.
-