Class ByteVectorSimilarityQuery


public class ByteVectorSimilarityQuery extends AbstractVectorSimilarityQuery
Search for all (approximate) byte vectors above a similarity threshold.
  • Field Details

    • target

      private final byte[] target
  • Constructor Details

    • ByteVectorSimilarityQuery

      public ByteVectorSimilarityQuery(String field, byte[] target, float traversalSimilarity, float resultSimilarity, Query filter)
      Search for all (approximate) byte vectors above a similarity threshold using VectorSimilarityCollector. If a filter is applied, it traverses as many nodes as the cost of the filter, and then falls back to exact search if results are incomplete.
      Parameters:
      field - a field that has been indexed as a KnnByteVectorField.
      target - the target of the search.
      traversalSimilarity - (lower) similarity score for graph traversal.
      resultSimilarity - (higher) similarity score for result collection.
      filter - a filter applied before the vector search.
    • ByteVectorSimilarityQuery

      public ByteVectorSimilarityQuery(String field, byte[] target, float traversalSimilarity, float resultSimilarity)
      Search for all (approximate) byte vectors above a similarity threshold using VectorSimilarityCollector.
      Parameters:
      field - a field that has been indexed as a KnnByteVectorField.
      target - the target of the search.
      traversalSimilarity - (lower) similarity score for graph traversal.
      resultSimilarity - (higher) similarity score for result collection.
    • ByteVectorSimilarityQuery

      public ByteVectorSimilarityQuery(String field, byte[] target, float resultSimilarity, Query filter)
      Search for all (approximate) byte vectors above a similarity threshold using VectorSimilarityCollector. If a filter is applied, it traverses as many nodes as the cost of the filter, and then falls back to exact search if results are incomplete.
      Parameters:
      field - a field that has been indexed as a KnnByteVectorField.
      target - the target of the search.
      resultSimilarity - similarity score for result collection.
      filter - a filter applied before the vector search.
    • ByteVectorSimilarityQuery

      public ByteVectorSimilarityQuery(String field, byte[] target, float resultSimilarity)
      Search for all (approximate) byte vectors above a similarity threshold using VectorSimilarityCollector.
      Parameters:
      field - a field that has been indexed as a KnnByteVectorField.
      target - the target of the search.
      resultSimilarity - similarity score for result collection.
  • Method Details