VectorFieldFunction (Lucene 10.5.0 queries API)
Description: declaration: package: org.apache.lucene.queries.function.valuesource, class: VectorFieldFunction

Package org.apache.lucene.queries.function.valuesource

# Class VectorFieldFunction

java.lang.Object
org.apache.lucene.queries.function.FunctionValues
org.apache.lucene.queries.function.valuesource.VectorFieldFunction

public abstract class VectorFieldFunction extends FunctionValues
An implementation for retrieving `FunctionValues` instances for knn vectors fields.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.queries.function.FunctionValues

  `FunctionValues.ValueFiller`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final ValueSource`
  `valueSource`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `VectorFieldFunction(ValueSource valueSource)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `exists(int doc)`
  Returns true if there is a value for this document
  `protected abstract DocIdSetIterator`
  `getVectorIterator()`
  `String`
  `toString(int doc)`

  ### Methods inherited from class org.apache.lucene.queries.function.FunctionValues

  `boolVal, bytesVal, byteVal, byteVal, byteVectorVal, cost, doubleVal, doubleVal, explain, floatVal, floatVal, floatVectorVal, getRangeScorer, getScorer, getValueFiller, intVal, intVal, longVal, longVal, numOrd, objectVal, ordVal, shortVal, shortVal, strVal, strVal`

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

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

- ## Field Details

  - ### valueSource

    protected final ValueSource valueSource

- ## Constructor Details

  - ### VectorFieldFunction

    protected VectorFieldFunction(ValueSource valueSource)

- ## Method Details

  - ### getVectorIterator

    protected abstract DocIdSetIterator getVectorIterator()

  - ### toString

    public String toString(int doc) throws IOException
    Specified by:
      `toString` in class `FunctionValues`
    Throws:
      `IOException`

  - ### exists

    public boolean exists(int doc) throws IOException
    Description copied from class: `FunctionValues`
    Returns true if there is a value for this document
    Overrides:
      `exists` in class `FunctionValues`
    Throws:
      `IOException`