Class DualDoubleFunction

java.lang.Object
org.apache.lucene.queries.function.ValueSource
org.apache.solr.search.function.DualDoubleFunction

public abstract class DualDoubleFunction extends org.apache.lucene.queries.function.ValueSource
Abstract ValueSource implementation which wraps two ValueSources and applies an extendible double function to their values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.apache.lucene.queries.function.ValueSource
     
    protected final org.apache.lucene.queries.function.ValueSource
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DualDoubleFunction(org.apache.lucene.queries.function.ValueSource a, org.apache.lucene.queries.function.ValueSource b)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createWeight(Map<Object,Object> context, org.apache.lucene.search.IndexSearcher searcher)
     
     
    boolean
     
    protected abstract double
    func(int doc, org.apache.lucene.queries.function.FunctionValues aVals, org.apache.lucene.queries.function.FunctionValues bVals)
     
    org.apache.lucene.queries.function.FunctionValues
    getValues(Map<Object,Object> context, org.apache.lucene.index.LeafReaderContext readerContext)
     
    int
     
    protected abstract String
     

    Methods inherited from class org.apache.lucene.queries.function.ValueSource

    asDoubleValuesSource, asLongValuesSource, fromDoubleValuesSource, getSortField, newContext, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • a

      protected final org.apache.lucene.queries.function.ValueSource a
    • b

      protected final org.apache.lucene.queries.function.ValueSource b
  • Constructor Details

    • DualDoubleFunction

      public DualDoubleFunction(org.apache.lucene.queries.function.ValueSource a, org.apache.lucene.queries.function.ValueSource b)
      Parameters:
      a - the base.
      b - the exponent.
  • Method Details

    • name

      protected abstract String name()
    • func

      protected abstract double func(int doc, org.apache.lucene.queries.function.FunctionValues aVals, org.apache.lucene.queries.function.FunctionValues bVals) throws IOException
      Throws:
      IOException
    • description

      public String description()
      Specified by:
      description in class org.apache.lucene.queries.function.ValueSource
    • 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
    • hashCode

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

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