org.hibernate.search.spatial.impl

## Class DistanceCollector

- java.lang.Object
- - org.hibernate.search.spatial.impl.DistanceCollector

- All Implemented Interfaces:
    Collector

      public class DistanceCollector
      extends Object
      implements Collector

  A Lucene distance `Collector` for spatial searches.
  Author:
    Sanne Grinovero, Nicolas Helleringer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistanceCollector(Coordinates centerCoordinates, int hitsCount, String fieldname)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Double` | `getDistance(int index)`
    `LeafCollector` | `getLeafCollector(LeafReaderContext context)`
    `boolean` | `needsScores()`

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

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

- - ### Constructor Detail

    - #### DistanceCollector

          public DistanceCollector(Coordinates centerCoordinates,
                                   int hitsCount,
                                   String fieldname)

  - ### Method Detail

    - #### getDistance

          public Double getDistance(int index)

    - #### getLeafCollector

          public LeafCollector getLeafCollector(LeafReaderContext context)
                                         throws IOException

      Specified by:
        `getLeafCollector` in interface `Collector`
      Throws:
        `IOException`

    - #### needsScores

          public boolean needsScores()

      Specified by:
        `needsScores` in interface `Collector`

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