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
Constructors Constructor Description LuceneSearchProjectionFactoryImpl(SearchProjectionDslContext<LuceneSearchProjectionIndexScope<?>> dslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectionFinalStep<org.apache.lucene.document.Document>document()Project to a LuceneDocumentcontaining all the stored fields.ProjectionFinalStep<org.apache.lucene.search.Explanation>explanation()Project to a LuceneExplanationdescribing the score computation for the hit.LuceneSearchProjectionFactory<R,E>withRoot(String objectFieldPath)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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods 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, highlight, id, id, object, score, toAbsolutePath
-
-
-
-
Constructor Detail
-
LuceneSearchProjectionFactoryImpl
public LuceneSearchProjectionFactoryImpl(SearchProjectionDslContext<LuceneSearchProjectionIndexScope<?>> dslContext)
-
-
Method Detail
-
withRoot
public LuceneSearchProjectionFactory<R,E> withRoot(String objectFieldPath)
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
public ProjectionFinalStep<org.apache.lucene.document.Document> 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
public ProjectionFinalStep<org.apache.lucene.search.Explanation> 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.
-
-