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

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

# Class ByteVectorSimilarityFunction

java.lang.Object
org.apache.lucene.queries.function.ValueSource
org.apache.lucene.queries.function.valuesource.VectorSimilarityFunction
org.apache.lucene.queries.function.valuesource.ByteVectorSimilarityFunction

public class ByteVectorSimilarityFunction extends VectorSimilarityFunction
`ByteVectorSimilarityFunction` returns a similarity function between two knn vectors with byte elements.

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.queries.function.valuesource.VectorSimilarityFunction

  `similarityFunction, vector1, vector2`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ByteVectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected float`
  `func(int doc, FunctionValues f1, FunctionValues f2)`

  ### Methods inherited from class org.apache.lucene.queries.function.valuesource.VectorSimilarityFunction

  `description, equals, getValues, hashCode`

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

  `asDoubleValuesSource, asLongValuesSource, createWeight, fromDoubleValuesSource, getSortField, newContext, toString`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ByteVectorSimilarityFunction

    public ByteVectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)

- ## Method Details

  - ### func

    protected float func(int doc, FunctionValues f1, FunctionValues f2) throws IOException
    Specified by:
      `func` in class `VectorSimilarityFunction`
    Throws:
      `IOException`