Class WeightedRanker.Builder

    • Method Detail

      • withWeights

        public WeightedRanker.Builder withWeights​(@NonNull
                                                  @NonNull java.util.List<java.lang.Float> weights)
        Assign weights for each AnnSearchParam. The length of weights must be equal to number of AnnSearchParam. You can assign any float value for weight, the sum of weight values can exceed 1. The distance/similarity values of each field will be mapped into a range of [0,1], and score = sum(weights[i] * distance_i_in_[0,1])
        Parameters:
        weights - weight values
        Returns:
        Builder