Class DistanceValueSource

  • All Implemented Interfaces:

    public class DistanceValueSource
    An implementation of the Lucene ValueSource model that returns the distance for a PointVectorStrategy.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Field Summary

      • Fields inherited from class

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(Object o) getValues​(org.apache.lucene.index.LeafReaderContext readerContext, scores)
      Returns the FunctionValues used by the function query.
      int hashCode()  
      boolean isCacheable​(org.apache.lucene.index.LeafReaderContext ctx)  
      boolean needsScores() rewrite​( searcher)  
      String toString()
      Returns the ValueSource description.
      • Methods inherited from class

        constant, explain, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, toLongValuesSource
    • Constructor Detail

      • DistanceValueSource

        public DistanceValueSource​(PointVectorStrategy strategy,
                                   org.locationtech.spatial4j.shape.Point from,
                                   double multiplier)
    • Method Detail

      • toString

        public String toString()
        Returns the ValueSource description.
        Specified by:
        toString in class
      • getValues

        public getValues​(org.apache.lucene.index.LeafReaderContext readerContext,
                                                        throws IOException
        Returns the FunctionValues used by the function query.
        Specified by:
        getValues in class
      • needsScores

        public boolean needsScores()
        Specified by:
        needsScores in class
      • isCacheable

        public boolean isCacheable​(org.apache.lucene.index.LeafReaderContext ctx)
      • rewrite

        public rewrite​( searcher)
                                                            throws IOException
        Specified by:
        rewrite in class
      • equals

        public boolean equals​(Object o)
        Specified by:
        equals in class
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class