Class HaversineConstFunction


  • public class HaversineConstFunction
    extends org.apache.lucene.queries.function.ValueSource
    Haversine function with one point constant
    • Constructor Detail

      • HaversineConstFunction

        public HaversineConstFunction​(double latCenter,
                                      double lonCenter,
                                      org.apache.lucene.queries.function.valuesource.VectorValueSource vs)
    • Method Detail

      • name

        protected String name()
      • getValues

        public org.apache.lucene.queries.function.FunctionValues getValues​(Map<Object,​Object> context,
                                                                           org.apache.lucene.index.LeafReaderContext readerContext)
                                                                    throws IOException
        Specified by:
        getValues in class org.apache.lucene.queries.function.ValueSource
        Throws:
        IOException
      • createWeight

        public void createWeight​(Map<Object,​Object> context,
                                 org.apache.lucene.search.IndexSearcher searcher)
                          throws IOException
        Overrides:
        createWeight in class org.apache.lucene.queries.function.ValueSource
        Throws:
        IOException
      • equals

        public boolean equals​(Object o)
        Specified by:
        equals in class org.apache.lucene.queries.function.ValueSource
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class org.apache.lucene.queries.function.ValueSource
      • description

        public String description()
        Specified by:
        description in class org.apache.lucene.queries.function.ValueSource