org.hibernate.search.query.dsl.sort.impl

## Class ConnectedSortDistanceNoFieldContext

- java.lang.Object
- - org.hibernate.search.query.dsl.sort.impl.AbstractConnectedSortContext
  - - org.hibernate.search.query.dsl.sort.impl.ConnectedSortDistanceNoFieldContext

- All Implemented Interfaces:
    SortDistanceNoFieldContext

      public class ConnectedSortDistanceNoFieldContext
      extends AbstractConnectedSortContext
      implements SortDistanceNoFieldContext

  Author:
    Emmanuel Bernard emmanuel@hibernate.org, Yoann Rodiere

- - ### Field Summary

    - ### Fields inherited from class org.hibernate.search.query.dsl.sort.impl.AbstractConnectedSortContext

      `queryContext, states`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectedSortDistanceNoFieldContext(QueryBuildingContext queryContext, SortFieldStates states)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SortDistanceFieldContext` | `onField(String fieldName)` Order elements by distance computed from the coordinates carried by the given field.

    - ### Methods inherited from class org.hibernate.search.query.dsl.sort.impl.AbstractConnectedSortContext

      `getQueryContext, getStates`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConnectedSortDistanceNoFieldContext

          public ConnectedSortDistanceNoFieldContext(QueryBuildingContext queryContext,
                                                     SortFieldStates states)

  - ### Method Detail

    - #### onField

          public SortDistanceFieldContext onField(String fieldName)

      Description copied from interface: `SortDistanceNoFieldContext`
      Order elements by distance computed from the coordinates carried by the given field.

      The distance is computed between the value of the given field (which must be a `Spatial` field) and reference coordinates, to be provided in the `next context`.

      Specified by:
        `onField` in interface `SortDistanceNoFieldContext`
      Parameters:
        `fieldName` - The name of the index field carrying the spatial coordinates.

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