Class ByteVectorSimilarityQuery


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

      • target

        private final byte[] target
    • Constructor Detail

      • ByteVectorSimilarityQuery

        public ByteVectorSimilarityQuery​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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.