Class FloatVectorSimilarityQuery


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

      • target

        private final float[] target
    • Constructor Detail

      • FloatVectorSimilarityQuery

        public FloatVectorSimilarityQuery​(java.lang.String field,
                                          float[] target,
                                          float traversalSimilarity,
                                          float resultSimilarity,
                                          Query filter)
        Search for all (approximate) float 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 KnnFloatVectorField.
        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.
      • FloatVectorSimilarityQuery

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

        public FloatVectorSimilarityQuery​(java.lang.String field,
                                          float[] target,
                                          float resultSimilarity,
                                          Query filter)
        Search for all (approximate) float 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 KnnFloatVectorField.
        target - the target of the search.
        resultSimilarity - similarity score for result collection.
        filter - a filter applied before the vector search.
      • FloatVectorSimilarityQuery

        public FloatVectorSimilarityQuery​(java.lang.String field,
                                          float[] target,
                                          float resultSimilarity)
        Search for all (approximate) float vectors above a similarity threshold using VectorSimilarityCollector.
        Parameters:
        field - a field that has been indexed as a KnnFloatVectorField.
        target - the target of the search.
        resultSimilarity - similarity score for result collection.