Interface ProjectionConstants

All Known Subinterfaces:
HSQuery

@Deprecated public interface ProjectionConstants
Deprecated.
Instead of using Hibernate Search 5 APIs, get a org.hibernate.search.mapper.orm.session.SearchSession using org.hibernate.search.mapper.orm.Search#session(org.hibernate.Session), create a SearchQuery with org.hibernate.search.mapper.orm.session.SearchSession#search(Class), and define your projections using SearchQuerySelectStep.select(Function). Refer to the migration guide for more information.
Defined projection constants.

Implementator's note: When adding new constants, be sure to add them to LuceneHSQuery#SUPPORTED_PROJECTION_CONSTANTS, too.

Author:
Emmanuel Bernard
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
    static final String
    Deprecated.
    See the javadoc of this class for how to create projections in Hibernate Search 6.
  • Field Details

    • THIS

      @Deprecated static final String THIS
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is SearchProjectionFactory.entity().
      Represents the Hibernate entity returned in a search.
      See Also:
    • DOCUMENT

      @Deprecated static final String DOCUMENT
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is LuceneSearchProjectionFactory.document(). You will need to pass LuceneExtension.get() to SearchProjectionFactory.extension(SearchProjectionFactoryExtension) in order to get access to this Lucene-specific feature.
      The Lucene document returned by a search.
      See Also:
    • SCORE

      @Deprecated static final String SCORE
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is SearchProjectionFactory.score().
      The legacy document's score from a search.
      See Also:
    • ID

      @Deprecated static final String ID
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is SearchProjectionFactory.entityReference(); call .id() on the reference to get the entity identifier.
      Object id property
      See Also:
    • EXPLANATION

      @Deprecated static final String EXPLANATION
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is LuceneSearchProjectionFactory.explanation(). You will need to pass LuceneExtension.get() to SearchProjectionFactory.extension(SearchProjectionFactoryExtension) in order to get access to this Lucene-specific feature.
      Lucene Explanation object describing the score computation for the matching object/document This feature is relatively expensive, do not use unless you return a limited amount of objects (using pagination) To retrieve explanation of a single result, consider retrieving the entity id and using fullTextQuery.explain(Object)
      See Also:
    • OBJECT_CLASS

      @Deprecated static final String OBJECT_CLASS
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is SearchProjectionFactory.entityReference(); call .type() on the reference to get the entity type.
      Represents the Hibernate entity class returned in a search. In contrast to the other constants this constant represents an actual field value of the underlying Lucene document and hence can directly be used in queries.
      See Also:
    • SPATIAL_DISTANCE

      @Deprecated static final String SPATIAL_DISTANCE
      Deprecated.
      See the javadoc of this class for how to create projections in Hibernate Search 6. The equivalent projection in Hibernate Search 6 is SearchProjectionFactory.distance(String, GeoPoint).
      Represents the distance (in kilometers) between an entity and the center of the search area in case of a spatial query.
      See Also: