Class LuceneSearchProjectionFactoryImpl<R,E>
java.lang.Object
org.hibernate.search.engine.search.projection.dsl.spi.AbstractSearchProjectionFactory<LuceneSearchProjectionFactory<R,E>,LuceneSearchProjectionIndexScope<?>,R,E>
org.hibernate.search.backend.lucene.search.projection.dsl.impl.LuceneSearchProjectionFactoryImpl<R,E>
- All Implemented Interfaces:
LuceneSearchProjectionFactory<R,,E> ExtendedSearchProjectionFactory<LuceneSearchProjectionFactory<R,,E>, R, E> SearchProjectionFactory<R,E>
public class LuceneSearchProjectionFactoryImpl<R,E>
extends AbstractSearchProjectionFactory<LuceneSearchProjectionFactory<R,E>,LuceneSearchProjectionIndexScope<?>,R,E>
implements LuceneSearchProjectionFactory<R,E>
-
Field Summary
Fields inherited from class org.hibernate.search.engine.search.projection.dsl.spi.AbstractSearchProjectionFactory
dslContext -
Constructor Summary
ConstructorsConstructorDescriptionLuceneSearchProjectionFactoryImpl(SearchProjectionDslContext<LuceneSearchProjectionIndexScope<?>> dslContext) -
Method Summary
Modifier and TypeMethodDescriptionProjectionFinalStep<org.apache.lucene.document.Document>document()Project to a LuceneDocumentcontaining all the stored fields.Project to aDocumentTreecontaining all the stored fields and nested documents.ProjectionFinalStep<org.apache.lucene.search.Explanation>Project to a LuceneExplanationdescribing the score computation for the hit.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
-
LuceneSearchProjectionFactoryImpl
public LuceneSearchProjectionFactoryImpl(SearchProjectionDslContext<LuceneSearchProjectionIndexScope<?>> 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<LuceneSearchProjectionFactory<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.
-
document
Description copied from interface:LuceneSearchProjectionFactoryProject to a LuceneDocumentcontaining all the stored fields.Note that only stored fields are returned: fields that are not marked as
projectablemay be missing.- Specified by:
documentin interfaceLuceneSearchProjectionFactory<R,E> - Returns:
- The final step of the projection DSL.
-
explanation
Description copied from interface:LuceneSearchProjectionFactoryProject to a LuceneExplanationdescribing the score computation for the hit.This feature is relatively expensive, do not use unless you return a limited amount of objects (using pagination).
- Specified by:
explanationin interfaceLuceneSearchProjectionFactory<R,E> - Returns:
- The final step of the projection DSL.
-
documentTree
Description copied from interface:LuceneSearchProjectionFactoryProject to aDocumentTreecontaining all the stored fields and nested documents.Note that only stored fields are returned: fields that are not marked as
projectablemay be missing.- Specified by:
documentTreein interfaceLuceneSearchProjectionFactory<R,E> - Returns:
- The final step of the projection DSL.
-