org.hibernate.search.engine

## Interface ProjectionConstants

- All Known Subinterfaces:
    FullTextQuery, FullTextQuery, HSQuery
  All Known Implementing Classes:
    AbstractHSQuery, ElasticsearchHSQueryImpl, FullTextQueryImpl, LuceneHSQuery

      public interface ProjectionConstants

  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 and Description
    --- | ---
    `static String` | `DOCUMENT` The Lucene document returned by a search.
    `static String` | `DOCUMENT_ID` Lucene Document id.
    `static String` | `EXPLANATION` 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 `DOCUMENT_ID` and using fullTextQuery.explain(int)
    `static String` | `ID` Object id property
    `static String` | `OBJECT_CLASS` Represents the Hibernate entity class returned in a search.
    `static String` | `SCORE` The legacy document's score from a search.
    `static String` | `SPATIAL_DISTANCE` Represents the distance (in kilometers) between an entity and the center of the search area in case of a spatial query.
    `static String` | `THIS` Represents the Hibernate entity returned in a search.

- - ### Field Detail

    - #### THIS

          static final String THIS

      Represents the Hibernate entity returned in a search.
      See Also:
        Constant Field Values

    - #### DOCUMENT

          static final String DOCUMENT

      The Lucene document returned by a search.
      See Also:
        Constant Field Values

    - #### SCORE

          static final String SCORE

      The legacy document's score from a search.
      See Also:
        Constant Field Values

    - #### ID

          static final String ID

      Object id property
      See Also:
        Constant Field Values

    - #### DOCUMENT_ID

          static final String DOCUMENT_ID

      Lucene Document id.

      Expert: Lucene document id can change overtime between 2 different IndexReader opening.

      See Also:
        Constant Field Values
      Experimental
        If you use this constant/feature, please speak up in the forum

    - #### EXPLANATION

          static final String EXPLANATION

      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 `DOCUMENT_ID` and using fullTextQuery.explain(int)
      See Also:
        Constant Field Values

    - #### OBJECT_CLASS

          static final String OBJECT_CLASS

      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:
        Constant Field Values

    - #### SPATIAL_DISTANCE

          static final String SPATIAL_DISTANCE

      Represents the distance (in kilometers) between an entity and the center of the search area in case of a spatial query.
      See Also:
        Constant Field Values

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved