Class ElasticsearchSearchProjectionFactoryImpl<R,E>
java.lang.Object
org.hibernate.search.engine.search.projection.dsl.spi.AbstractSearchProjectionFactory<ElasticsearchSearchProjectionFactory<R,E>,ElasticsearchSearchProjectionIndexScope<?>,R,E>
org.hibernate.search.backend.elasticsearch.search.projection.dsl.impl.ElasticsearchSearchProjectionFactoryImpl<R,E>
- All Implemented Interfaces:
ElasticsearchSearchProjectionFactory<R,,E> ExtendedSearchProjectionFactory<ElasticsearchSearchProjectionFactory<R,,E>, R, E> SearchProjectionFactory<R,E>
public class ElasticsearchSearchProjectionFactoryImpl<R,E>
extends AbstractSearchProjectionFactory<ElasticsearchSearchProjectionFactory<R,E>,ElasticsearchSearchProjectionIndexScope<?>,R,E>
implements ElasticsearchSearchProjectionFactory<R,E>
-
Field Summary
Fields inherited from class org.hibernate.search.engine.search.projection.dsl.spi.AbstractSearchProjectionFactory
dslContext -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSearchProjectionFactoryImpl(SearchProjectionDslContext<ElasticsearchSearchProjectionIndexScope<?>> dslContext) -
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.Create a new projection factory whose root for all paths passed to the DSL will be the given object field.Methods inherited from class org.hibernate.search.engine.search.projection.dsl.spi.AbstractSearchProjectionFactory
composite, composite, constant, distance, documentReference, entity, entity, entityReference, extension, extension, field, field, highlight, id, object, score, toAbsolutePath, withParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, entity, entityReference, extension, extension, field, field, field, field, field, field, highlight, id, id, object, score, toAbsolutePath, withParameters
-
Constructor Details
-
ElasticsearchSearchProjectionFactoryImpl
public ElasticsearchSearchProjectionFactoryImpl(SearchProjectionDslContext<ElasticsearchSearchProjectionIndexScope<?>> dslContext)
-
-
Method Details
-
withRoot
Description copied from interface:SearchProjectionFactoryCreate a new projection factory whose root for all paths passed to the DSL will be the given object field.This is used to call reusable methods that can apply the same projection on different object fields that have same structure (same sub-fields).
- Specified by:
withRootin interfaceExtendedSearchProjectionFactory<ElasticsearchSearchProjectionFactory<R,E>, R, E> - Specified by:
withRootin interfaceSearchProjectionFactory<R,E> - Parameters:
objectFieldPath- The path from the current root to an object field that will become the new root.- Returns:
- A new projection factory using the given object field as root.
-
source
Description copied from interface:ElasticsearchSearchProjectionFactoryProject to aJsonObjectrepresenting the document as stored in Elasticsearch.- Specified by:
sourcein interfaceElasticsearchSearchProjectionFactory<R,E> - Returns:
- The final step of the projection DSL.
-
explanation
Description copied from interface:ElasticsearchSearchProjectionFactoryProject 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).
- Specified by:
explanationin interfaceElasticsearchSearchProjectionFactory<R,E> - Returns:
- The final step of the projection DSL.
-
jsonHit
Description copied from interface:ElasticsearchSearchProjectionFactoryProject to aJsonObjectrepresenting the hit as returned by Elasticsearch.- Specified by:
jsonHitin interfaceElasticsearchSearchProjectionFactory<R,E> - Returns:
- The final step of the projection DSL.
-