java.lang.Object
org.elasticsearch.script.field.vectors.ESVectorUtil

public class ESVectorUtil extends Object
This class consists of a single utility method that provides XOR bit count computed over signed bytes. Remove this class when Lucene version > 9.11 is released, and replace with Lucene's VectorUtil directly.
  • Method Details

    • xorBitCount

      public static int xorBitCount(byte[] a, byte[] b)
      XOR bit count computed over signed bytes.
      Parameters:
      a - bytes containing a vector
      b - bytes containing another vector, of the same dimension
      Returns:
      the value of the XOR bit count of the two vectors